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

Unified Diff: src/objects.h

Issue 1481613003: [Proxies] Support constructable proxy as new.target (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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 7f373e6fc7d1d1b237a0d1eac22a0a584f9a94bf..f46f70b778fc57918ca1d74c2932f127f62679da 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
@@ -7208,6 +7212,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
@@ -9502,6 +9508,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 | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698