Index: src/contexts.h |
diff --git a/src/contexts.h b/src/contexts.h |
index 8df16dd50ac47f897720f1d1c738944e3043c396..cfc576cecb6fedb6d83d893650824f39ed55cccf 100644 |
--- a/src/contexts.h |
+++ b/src/contexts.h |
@@ -190,7 +190,8 @@ enum BindingFlags { |
// Dynamically declared variables/functions are also added |
// to lazily allocated extension object. Context::Lookup |
// searches the extension object for properties. |
-// For block contexts, contains the respective ScopeInfo. |
+// For global and block contexts, contains the respective |
+// ScopeInfo. |
// For module contexts, points back to the respective JSModule. |
// |
// [ global_object ] A pointer to the global object. Provided for quick |
@@ -363,6 +364,10 @@ class Context: public FixedArray { |
Map* map = this->map(); |
return map == map->GetHeap()->module_context_map(); |
} |
+ bool IsGlobalContext() { |
+ Map* map = this->map(); |
+ return map == map->GetHeap()->global_context_map(); |
+ } |
// Tells whether the native context is marked with out of memory. |
inline bool has_out_of_memory(); |