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

Unified Diff: src/runtime/runtime-proxy.cc

Issue 1427743011: [proxies] Remove "fix" functionality, add (still unused) target property. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test 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/runtime/runtime.h ('k') | test/mjsunit/harmony/proxies.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-proxy.cc
diff --git a/src/runtime/runtime-proxy.cc b/src/runtime/runtime-proxy.cc
index 4699647b8013a7d30c633b3192089d4ecc7a027a..b4f7f61e0b625cbc7329a1e0ff266e1001d7accc 100644
--- a/src/runtime/runtime-proxy.cc
+++ b/src/runtime/runtime-proxy.cc
@@ -13,24 +13,26 @@ namespace internal {
RUNTIME_FUNCTION(Runtime_CreateJSProxy) {
HandleScope scope(isolate);
- DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(JSReceiver, handler, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 1);
+ DCHECK(args.length() == 3);
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, target, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, handler, 1);
+ CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 2);
if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value();
- return *isolate->factory()->NewJSProxy(handler, prototype);
+ return *isolate->factory()->NewJSProxy(target, handler, prototype);
}
RUNTIME_FUNCTION(Runtime_CreateJSFunctionProxy) {
HandleScope scope(isolate);
- DCHECK(args.length() == 4);
- CONVERT_ARG_HANDLE_CHECKED(JSReceiver, handler, 0);
- CONVERT_ARG_HANDLE_CHECKED(JSReceiver, call_trap, 1);
+ DCHECK(args.length() == 5);
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, target, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, handler, 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, call_trap, 2);
RUNTIME_ASSERT(call_trap->IsJSFunction() || call_trap->IsJSFunctionProxy());
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, construct_trap, 2);
- CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 3);
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, construct_trap, 3);
+ CONVERT_ARG_HANDLE_CHECKED(Object, prototype, 4);
if (!prototype->IsJSReceiver()) prototype = isolate->factory()->null_value();
- return *isolate->factory()->NewJSFunctionProxy(handler, call_trap,
+ return *isolate->factory()->NewJSFunctionProxy(target, handler, call_trap,
construct_trap, prototype);
}
@@ -74,13 +76,5 @@ RUNTIME_FUNCTION(Runtime_GetConstructTrap) {
return proxy->construct_trap();
}
-
-RUNTIME_FUNCTION(Runtime_Fix) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, 0);
- JSProxy::Fix(proxy);
- return isolate->heap()->undefined_value();
-}
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/harmony/proxies.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698