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

Unified Diff: src/objects.h

Issue 1481773003: [Proxies] Support constructable proxy as new.target (reland) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Diff with previous version 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
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)
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/objects.cc » ('j') | src/runtime/runtime-object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698