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

Unified Diff: src/proxy.js

Issue 7109004: Revert "Make instanceof and Object.getPrototypeOf work for proxies, plus a few other tweaks." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months 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/objects-inl.h ('k') | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/proxy.js
diff --git a/src/proxy.js b/src/proxy.js
index cb9c020e35c60c9b0cdcf15e961ca9a8fdb73789..d90e5d4ca8ad50f9a2793a74fc20cb4d2ceb5130 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -60,9 +60,8 @@ $Proxy.createFunction = function(handler, callTrap, constructTrap) {
}
$Proxy.create = function(handler, proto) {
- if (!IS_SPEC_OBJECT(handler))
- throw MakeTypeError("handler_non_object", ["create"])
- if (!IS_SPEC_OBJECT(proto)) proto = null // Mozilla does this...
+ if (!IS_SPEC_OBJECT(handler)) throw TypeError
+ if (!IS_SPEC_OBJECT(proto)) proto = $Object.prototype
return %CreateJSProxy(handler, proto)
}
@@ -131,7 +130,3 @@ function DerivedSetTrap(receiver, name, val) {
configurable: true});
return true;
}
-
-function DerivedHasTrap(name) {
- return !!this.getPropertyDescriptor(name)
-}
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698