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

Unified Diff: src/proxy.js

Issue 11274047: Set up Proxy methods the proper way. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | 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 4e86c8892a3c8d08ef966f70d8485de50a5f10fd..91019d71a151b5d1c73e8896c9bff87de45fd612 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -31,7 +31,7 @@ global.Proxy = new $Object();
var $Proxy = global.Proxy
-$Proxy.create = function(handler, proto) {
+function ProxyCreate(handler, proto) {
if (!IS_SPEC_OBJECT(handler))
throw MakeTypeError("handler_non_object", ["create"])
if (IS_UNDEFINED(proto))
@@ -41,7 +41,7 @@ $Proxy.create = function(handler, proto) {
return %CreateJSProxy(handler, proto)
}
-$Proxy.createFunction = function(handler, callTrap, constructTrap) {
+function ProxyCreateFunction(handler, callTrap, constructTrap) {
if (!IS_SPEC_OBJECT(handler))
throw MakeTypeError("handler_non_object", ["create"])
if (!IS_SPEC_FUNCTION(callTrap))
@@ -62,6 +62,10 @@ $Proxy.createFunction = function(handler, callTrap, constructTrap) {
handler, callTrap, constructTrap, $Function.prototype)
}
+%InstallFunctions($Proxy, DONT_ENUM, [
Michael Starzinger 2012/10/25 15:04:16 Change this to not use a natives syntax runtime ca
+ "create", ProxyCreate,
+ "createFunction", ProxyCreateFunction
+])
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698