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

Unified Diff: src/objects.h

Issue 1441043002: [proxies] Implement [[PreventExtensions]] and [[IsExtensible]]. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Various changes. 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 | « src/messages.h ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
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 d30bda2ad3986abe8c6217f60ce1059e15e0c541..4a0696c6001a1549a04f776ae6dde30cc9734d86 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -9520,6 +9520,10 @@ class JSProxy: public JSReceiver {
// ES6 9.5.1
static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver);
+ static bool IsRevoked(Handle<JSProxy> proxy);
+
+ MUST_USE_RESULT static Maybe<bool> IsExtensible(Handle<JSProxy> proxy);
Camillo Bruni 2015/11/17 08:57:17 can you put the ES6 section? 9.5.?
+
// ES6 9.5.5
static bool GetOwnPropertyDescriptor(LookupIterator* it,
PropertyDescriptor* desc);
@@ -9529,6 +9533,10 @@ class JSProxy: public JSReceiver {
Handle<Object> receiver,
Handle<Name> name);
+ // ES6 9.5.4 [[PreventExtensions]] (when passed DONT_THROW)
+ MUST_USE_RESULT static Maybe<bool> PreventExtensions(
+ Handle<JSProxy> proxy, ShouldThrow should_throw);
+
// If the handler defines an accessor property with a setter, invoke it.
// If it defines an accessor property without a setter, or a data property
// that is read-only, fail. In all these cases set '*done' to true.
@@ -9568,6 +9576,9 @@ class JSProxy: public JSReceiver {
private:
friend class JSReceiver;
+ MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy,
+ Handle<String> trap);
+
// Invoke a trap by name. If the trap does not exist on this's handler,
// but derived_trap is non-NULL, invoke that instead. May cause GC.
MUST_USE_RESULT static MaybeHandle<Object> CallTrap(
« no previous file with comments | « src/messages.h ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698