Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: src/factory.cc

Issue 1480003002: [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add patch from Orion for interpreter cementation test. Disable obsolete/invalid tests. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index b321adec29915d2191caa77eb5ceac1fba37b598..24215b64e5e2c45f6997bf5dfb87a3ac40022ed4 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -725,6 +725,7 @@ Handle<Context> Factory::NewNativeContext() {
NewFixedArray(Context::NATIVE_CONTEXT_SLOTS, TENURED);
array->set_map_no_write_barrier(*native_context_map());
Handle<Context> context = Handle<Context>::cast(array);
+ context->set_native_context(*context);
context->set_js_array_maps(*undefined_value());
context->set_errors_thrown(Smi::FromInt(0));
DCHECK(context->IsNativeContext());
@@ -741,7 +742,7 @@ Handle<Context> Factory::NewScriptContext(Handle<JSFunction> function,
context->set_closure(*function);
context->set_previous(function->context());
context->set_extension(*scope_info);
- context->set_global_object(function->context()->global_object());
+ context->set_native_context(function->native_context());
DCHECK(context->IsScriptContext());
return context;
}
@@ -777,7 +778,7 @@ Handle<Context> Factory::NewFunctionContext(int length,
context->set_closure(*function);
context->set_previous(function->context());
context->set_extension(Smi::FromInt(0));
- context->set_global_object(function->context()->global_object());
+ context->set_native_context(function->native_context());
return context;
}
@@ -793,7 +794,7 @@ Handle<Context> Factory::NewCatchContext(Handle<JSFunction> function,
context->set_closure(*function);
context->set_previous(*previous);
context->set_extension(*name);
- context->set_global_object(previous->global_object());
+ context->set_native_context(previous->native_context());
context->set(Context::THROWN_OBJECT_INDEX, *thrown_object);
return context;
}
@@ -808,7 +809,7 @@ Handle<Context> Factory::NewWithContext(Handle<JSFunction> function,
context->set_closure(*function);
context->set_previous(*previous);
context->set_extension(*extension);
- context->set_global_object(previous->global_object());
+ context->set_native_context(previous->native_context());
return context;
}
@@ -823,7 +824,7 @@ Handle<Context> Factory::NewBlockContext(Handle<JSFunction> function,
context->set_closure(*function);
context->set_previous(*previous);
context->set_extension(*scope_info);
- context->set_global_object(previous->global_object());
+ context->set_native_context(previous->native_context());
return context;
}
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698