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

Unified Diff: src/runtime.js

Issue 7887031: Make built-in functions not call .apply on functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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/execution.cc ('k') | src/string.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index c52e7fb2dcb20b19b5e9dd1e36a77aa15ba373ed..14ff1b69cfe02bc3b2ee242f55f274107f6f3f31 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -408,7 +408,7 @@ function CALL_NON_FUNCTION() {
if (!IS_FUNCTION(delegate)) {
throw %MakeTypeError('called_non_callable', [typeof this]);
}
- return delegate.apply(this, arguments);
+ return %Apply(delegate, this, arguments, 0, %_ArgumentsLength());
}
@@ -417,7 +417,7 @@ function CALL_NON_FUNCTION_AS_CONSTRUCTOR() {
if (!IS_FUNCTION(delegate)) {
throw %MakeTypeError('called_non_callable', [typeof this]);
}
- return delegate.apply(this, arguments);
+ return %Apply(delegate, this, arguments, 0, %_ArgumentsLength());
}
« no previous file with comments | « src/execution.cc ('k') | src/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698