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

Unified Diff: src/proxy.js

Issue 8116027: Remove two left-over uses of Function.prototype.apply that I overlooked when merging proxy CLs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 1ec84c1ec85998dbfa4eadbb233c33526b75e91c..a51f09ae50ff3eee75840e970413ddd75909d9a9 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
}
}
« 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