From: rossberg@chromium.org Date: Tue, 4 Oct 2011 12:48:16 +0000 (+0000) Subject: Remove two left-over uses of Function.prototype.apply that I overlooked when merging... X-Git-Tag: upstream/4.7.83~18292 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abc8b0d18347b1a10b11eb8c7d4f502038a251fd;p=platform%2Fupstream%2Fv8.git Remove two left-over uses of Function.prototype.apply that I overlooked when merging proxy CLs. R=ricow@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/8116027 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/proxy.js b/src/proxy.js index 1ec84c1..a51f09a 100644 --- a/src/proxy.js +++ b/src/proxy.js @@ -47,7 +47,7 @@ $Proxy.createFunction = function(handler, callTrap, constructTrap) { } else if (IS_SPEC_FUNCTION(constructTrap)) { construct = function() { // Make sure the trap receives 'undefined' as this. - return $Function.prototype.apply.call(constructTrap, void 0, arguments) + return %Apply(constructTrap, void 0, arguments, 0, %_ArgumentsLength()); } } else { throw MakeTypeError("trap_function_expected", @@ -69,7 +69,7 @@ function DerivedConstructTrap(callTrap) { if (!IS_SPEC_OBJECT(proto)) proto = $Object.prototype var obj = new $Object() obj.__proto__ = proto - var result = $Function.prototype.apply.call(callTrap, obj, arguments) + var result = %Apply(callTrap, obj, arguments, 0, %_ArgumentsLength()); return IS_SPEC_OBJECT(result) ? result : obj } }