Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index e142320aa0d102d2b343c2cc880347276d4f2759..52ce6d30275043f6a0cbd9e51e3ee5ddae993a1c 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1800,6 +1800,8 @@ class JSReceiver: public HeapObject { |
MUST_USE_RESULT static MaybeHandle<Object> OrdinaryToPrimitive( |
Handle<JSReceiver> receiver, OrdinaryToPrimitiveHint hint); |
+ static MaybeHandle<Context> GetFunctionRealm(Handle<JSReceiver> receiver); |
+ |
// Implementation of [[HasProperty]], ECMA-262 5th edition, section 8.12.6. |
MUST_USE_RESULT static Maybe<bool> HasProperty(LookupIterator* it); |
MUST_USE_RESULT static inline Maybe<bool> HasProperty( |
@@ -1955,6 +1957,8 @@ class JSObject: public JSReceiver { |
// Gets global object properties. |
inline GlobalDictionary* global_dictionary(); |
+ static MaybeHandle<Context> GetFunctionRealm(Handle<JSObject> object); |
+ |
// [elements]: The elements (properties with names that are integers). |
// |
// Elements can be in two general modes: fast and slow. Each mode |
@@ -7201,6 +7205,8 @@ class JSFunction: public JSObject { |
inline JSObject* global_proxy(); |
inline Context* native_context(); |
+ static MaybeHandle<Context> GetFunctionRealm(Handle<JSFunction> function); |
+ |
// [code]: The generated code object for this function. Executed |
// when the function is invoked, e.g. foo() or new foo(). See |
// [[Call]] and [[Construct]] description in ECMA-262, section |
@@ -9495,6 +9501,8 @@ class JSProxy: public JSReceiver { |
// [hash]: The hash code property (undefined if not initialized yet). |
DECL_ACCESSORS(hash, Object) |
+ static MaybeHandle<Context> GetFunctionRealm(Handle<JSProxy> proxy); |
+ |
inline bool has_handler(); |
DECLARE_CAST(JSProxy) |