Commit b4a17d64 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

Avoid reading uninitialized data in SharedFunctionInfo DCHECK.

BUG=v8:5708

Review-Url: https://codereview.chromium.org/2548813002
Cr-Commit-Position: refs/heads/master@{#41456}
parent d542b077
......@@ -2311,6 +2311,7 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
// Set pointer fields.
share->set_name(*name);
share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER);
Handle<Code> code;
if (!maybe_code.ToHandle(&code)) {
code = isolate()->builtins()->Illegal();
......@@ -2324,7 +2325,6 @@ Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
: isolate()->builtins()->ConstructedNonConstructable();
share->SetConstructStub(*construct_stub);
share->set_instance_class_name(*Object_string());
share->set_function_data(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_script(*undefined_value(), SKIP_WRITE_BARRIER);
share->set_debug_info(DebugInfo::uninitialized(), SKIP_WRITE_BARRIER);
share->set_function_identifier(*undefined_value(), SKIP_WRITE_BARRIER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment