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

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: using one friend less 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..b8196b8cc39a427545f8b17bb03fcd3dd71678c6 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,
@@ -9631,6 +9637,10 @@ class JSProxy: public JSReceiver {
kPaddingOffset,
kSize> BodyDescriptor;
+ MUST_USE_RESULT Object* GetIdentityHash();
+
+ static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy);
+
private:
friend class JSReceiver;
@@ -9640,10 +9650,6 @@ class JSProxy: public JSReceiver {
MUST_USE_RESULT static MaybeHandle<Object> DeletePropertyWithHandler(
Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode);
- MUST_USE_RESULT Object* GetIdentityHash();
-
- static Handle<Smi> GetOrCreateIdentityHash(Handle<JSProxy> proxy);
-
DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy);
};

Powered by Google App Engine
This is Rietveld 408576698