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

Unified Diff: test/mjsunit/harmony/proxies-example-membrane.js

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: removing unreachable code 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 | « test/mjsunit/harmony/proxies.js ('k') | test/mjsunit/harmony/proxies-for.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/proxies-example-membrane.js
diff --git a/test/mjsunit/harmony/proxies-example-membrane.js b/test/mjsunit/harmony/proxies-example-membrane.js
index 7b2af722f2de3a71e9a016f35c3531077d09bddc..72ab092a884b3e154baa0ddaa42f3447f2a672e0 100644
--- a/test/mjsunit/harmony/proxies-example-membrane.js
+++ b/test/mjsunit/harmony/proxies-example-membrane.js
@@ -155,7 +155,7 @@ function createSimpleMembrane(target) {
}
var baseHandler = createHandler(obj);
- var handler = Proxy.create(Object.freeze({
+ var handler = new Proxy({}, Object.freeze({
get: function(receiver, name) {
return function() {
var arg = (name === "get" || name == "set") ? arguments[1] : "";
@@ -188,7 +188,7 @@ function createSimpleMembrane(target) {
return Proxy.createFunction(handler, callTrap, constructTrap);
} else {
var prototype = wrap(Object.getPrototypeOf(obj));
- return Proxy.create(handler, prototype);
+ return new Proxy(prototype, handler);
}
}
@@ -311,7 +311,7 @@ function createMembrane(wetTarget) {
if (dryResult) { return dryResult; }
var wetHandler = createHandler(wet);
- var dryRevokeHandler = Proxy.create(Object.freeze({
+ var dryRevokeHandler = new Proxy({}, Object.freeze({
get: function(receiver, name) {
return function() {
var arg = (name === "get" || name == "set") ? arguments[1] : "";
@@ -348,7 +348,7 @@ function createMembrane(wetTarget) {
Proxy.createFunction(dryRevokeHandler, callTrap, constructTrap);
} else {
dryResult =
- Proxy.create(dryRevokeHandler, asDry(Object.getPrototypeOf(wet)));
+ new Proxy(asDry(Object.getPrototypeOf(wet)), dryRevokeHandler);
}
wet2dry.set(wet, dryResult);
dry2wet.set(dryResult, wet);
@@ -378,7 +378,7 @@ function createMembrane(wetTarget) {
if (wetResult) { return wetResult; }
var dryHandler = createHandler(dry);
- var wetRevokeHandler = Proxy.create(Object.freeze({
+ var wetRevokeHandler = new Proxy({}, Object.freeze({
get: function(receiver, name) {
return function() {
var arg = (name === "get" || name == "set") ? arguments[1] : "";
@@ -415,7 +415,7 @@ function createMembrane(wetTarget) {
Proxy.createFunction(wetRevokeHandler, callTrap, constructTrap);
} else {
wetResult =
- Proxy.create(wetRevokeHandler, asWet(Object.getPrototypeOf(dry)));
+ new Proxy(asWet(Object.getPrototypeOf(dry)), wetRevokeHandler);
}
dry2wet.set(dry, wetResult);
wet2dry.set(wetResult, dry);
« no previous file with comments | « test/mjsunit/harmony/proxies.js ('k') | test/mjsunit/harmony/proxies-for.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698