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

Unified Diff: src/contexts-inl.h

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/contexts.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts-inl.h
diff --git a/src/contexts-inl.h b/src/contexts-inl.h
index 437aacf4afb451a0d81931bc82de251e0951275e..67358a7a1dd3e2029fb6d9ccadaa7e437c4ebe47 100644
--- a/src/contexts-inl.h
+++ b/src/contexts-inl.h
@@ -65,15 +65,15 @@ JSModule* Context::module() { return JSModule::cast(get(EXTENSION_INDEX)); }
void Context::set_module(JSModule* module) { set(EXTENSION_INDEX, module); }
-JSGlobalObject* Context::global_object() {
- Object* result = get(GLOBAL_OBJECT_INDEX);
- DCHECK(IsBootstrappingOrGlobalObject(this->GetIsolate(), result));
- return reinterpret_cast<JSGlobalObject*>(result);
+Context* Context::native_context() {
+ Object* result = get(NATIVE_CONTEXT_INDEX);
+ DCHECK(IsBootstrappingOrNativeContext(this->GetIsolate(), result));
+ return reinterpret_cast<Context*>(result);
}
-void Context::set_global_object(JSGlobalObject* object) {
- set(GLOBAL_OBJECT_INDEX, object);
+void Context::set_native_context(Context* context) {
+ set(NATIVE_CONTEXT_INDEX, context);
}
@@ -120,8 +120,8 @@ bool Context::IsScriptContext() {
bool Context::HasSameSecurityTokenAs(Context* that) {
- return this->global_object()->native_context()->security_token() ==
- that->global_object()->native_context()->security_token();
+ return this->native_context()->security_token() ==
+ that->native_context()->security_token();
}
« no previous file with comments | « src/contexts.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698