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

Unified Diff: src/objects.h

Issue 1417063011: [runtime] support new Proxy() instead of Proxy.create and install getPrototypeOf trap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: skipping tests on ignition for now 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 93f57333a150498810f73f264c74082e2147ff3b..cfbfee0d0fbace0934770f446bc2b343f0125230 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1306,8 +1306,8 @@ class Object {
Handle<Object> value, LanguageMode language_mode);
// Get the first non-hidden prototype.
- static inline Handle<Object> GetPrototype(Isolate* isolate,
- Handle<Object> receiver);
+ static inline MaybeHandle<Object> GetPrototype(Isolate* isolate,
+ Handle<Object> receiver);
bool HasInPrototypeChain(Isolate* isolate, Object* object);
@@ -1917,6 +1917,8 @@ class JSReceiver: public HeapObject {
MUST_USE_RESULT static Maybe<bool> PreventExtensions(
Handle<JSReceiver> object, ShouldThrow should_throw);
+ MUST_USE_RESULT static Maybe<bool> IsExtensible(Handle<JSReceiver> object);
+
// Tests for the fast common case for property enumeration.
bool IsSimpleEnum();
@@ -9567,12 +9569,16 @@ class JSProxy: public JSReceiver {
public:
// [handler]: The handler property.
DECL_ACCESSORS(handler, Object)
-
+ // [target]: The target property.
+ DECL_ACCESSORS(target, Object)
// [hash]: The hash code property (undefined if not initialized yet).
DECL_ACCESSORS(hash, Object)
DECLARE_CAST(JSProxy)
+
+ static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver);
+
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler(
Handle<JSProxy> proxy,
Handle<Object> receiver,
@@ -9633,6 +9639,7 @@ class JSProxy: public JSReceiver {
private:
friend class JSReceiver;
+ friend class JSObject;
MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler(
Handle<JSProxy> proxy, Handle<Name> name);

Powered by Google App Engine
This is Rietveld 408576698