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

Unified Diff: src/objects.h

Issue 1439693002: [runtime] Support Proxy setPrototypeOf trap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-11-09_new_Proxy_1417063011
Patch Set: more tests 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 38f5b7d503d8d2669058e4c580d6203f0f36500d..e5f80603fc06c13aa68d370f991ab4f3f6ad3a52 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1030,7 +1030,7 @@ class Object {
#define RETURN_FAILURE(isolate, should_throw, call) \
do { \
- if ((should_throw) == DONT_THROW) { \
+ if ((should_throw) == Object::DONT_THROW) { \
return Just(false); \
} else { \
isolate->Throw(*isolate->factory()->call); \
@@ -1172,7 +1172,8 @@ class Object {
// ES6 section 7.3.9 GetMethod
MUST_USE_RESULT static MaybeHandle<Object> GetMethod(
- Handle<JSReceiver> receiver, Handle<Name> name);
+ Handle<JSReceiver> receiver, Handle<Name> name,
+ ShouldThrow should_throw = THROW_ON_ERROR);
// ES6 section 12.5.6 The typeof Operator
static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object);
@@ -9578,7 +9579,11 @@ class JSProxy: public JSReceiver {
DECLARE_CAST(JSProxy)
- static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver);
+ // Proxy Traps:
+ static MaybeHandle<Object> GetPrototype(Handle<JSProxy> proxy);
+ static Maybe<bool> SetPrototype(Handle<JSProxy> proxy, Handle<Object> value,
+ bool from_javascript,
+ ShouldThrow should_throw);
MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler(
Handle<JSProxy> proxy,
« 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