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

Unified Diff: src/contexts-inl.h

Issue 1478303002: Revert of [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: 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 67358a7a1dd3e2029fb6d9ccadaa7e437c4ebe47..437aacf4afb451a0d81931bc82de251e0951275e 100644
--- a/src/contexts-inl.h
+++ b/src/contexts-inl.h
@@ -65,15 +65,15 @@
void Context::set_module(JSModule* module) { set(EXTENSION_INDEX, module); }
-Context* Context::native_context() {
- Object* result = get(NATIVE_CONTEXT_INDEX);
- DCHECK(IsBootstrappingOrNativeContext(this->GetIsolate(), result));
- return reinterpret_cast<Context*>(result);
+JSGlobalObject* Context::global_object() {
+ Object* result = get(GLOBAL_OBJECT_INDEX);
+ DCHECK(IsBootstrappingOrGlobalObject(this->GetIsolate(), result));
+ return reinterpret_cast<JSGlobalObject*>(result);
}
-void Context::set_native_context(Context* context) {
- set(NATIVE_CONTEXT_INDEX, context);
+void Context::set_global_object(JSGlobalObject* object) {
+ set(GLOBAL_OBJECT_INDEX, object);
}
@@ -120,8 +120,8 @@
bool Context::HasSameSecurityTokenAs(Context* that) {
- return this->native_context()->security_token() ==
- that->native_context()->security_token();
+ return this->global_object()->native_context()->security_token() ==
+ that->global_object()->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