Commit abc8b0d1 authored by rossberg@chromium.org's avatar rossberg@chromium.org

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
parent 3c812247
...@@ -47,7 +47,7 @@ $Proxy.createFunction = function(handler, callTrap, constructTrap) { ...@@ -47,7 +47,7 @@ $Proxy.createFunction = function(handler, callTrap, constructTrap) {
} else if (IS_SPEC_FUNCTION(constructTrap)) { } else if (IS_SPEC_FUNCTION(constructTrap)) {
construct = function() { construct = function() {
// Make sure the trap receives 'undefined' as this. // 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 { } else {
throw MakeTypeError("trap_function_expected", throw MakeTypeError("trap_function_expected",
...@@ -69,7 +69,7 @@ function DerivedConstructTrap(callTrap) { ...@@ -69,7 +69,7 @@ function DerivedConstructTrap(callTrap) {
if (!IS_SPEC_OBJECT(proto)) proto = $Object.prototype if (!IS_SPEC_OBJECT(proto)) proto = $Object.prototype
var obj = new $Object() var obj = new $Object()
obj.__proto__ = proto 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 return IS_SPEC_OBJECT(result) ? result : obj
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment