Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index 759728b0a285f68bdb1aec751a77de9fce15ceba..a2e85f262679bc5a00775ae2ae7439a4a5ed9076 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -288,18 +288,19 @@ |
(FLAG_trap_on_stub_deopt && IsStub()); |
} |
- bool has_native_context() const { |
- return !closure().is_null() && (closure()->native_context() != nullptr); |
- } |
+ bool has_global_object() const { |
+ return !closure().is_null() && |
+ (closure()->context()->global_object() != NULL); |
+ } |
+ |
+ JSGlobalObject* global_object() const { |
+ return has_global_object() ? closure()->context()->global_object() : NULL; |
+ } |
+ |
+ bool has_native_context() const { return has_global_object(); } |
Context* native_context() const { |
- return has_native_context() ? closure()->native_context() : nullptr; |
- } |
- |
- bool has_global_object() const { return has_native_context(); } |
- |
- JSGlobalObject* global_object() const { |
- return has_global_object() ? native_context()->global_object() : nullptr; |
+ return has_native_context() ? global_object()->native_context() : nullptr; |
} |
// Accessors for the different compilation modes. |