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

Unified Diff: src/runtime.js

Issue 1325573004: [runtime] Replace many buggy uses of %_CallFunction with %_Call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. Created 5 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/promise.js ('k') | src/runtime/runtime.h » ('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 82c668a6e26438475b00f59cacb0b2ceb2788836..e5e306d8cd83a32fd6510004b58a3bd5beefa4a4 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -717,14 +717,14 @@ function IsConcatSpreadable(O) {
function DefaultNumber(x) {
var valueOf = x.valueOf;
if (IS_CALLABLE(valueOf)) {
- var v = %_CallFunction(x, valueOf);
+ var v = %_Call(valueOf, x);
if (IS_SYMBOL(v)) throw MakeTypeError(kSymbolToNumber);
if (IS_SIMD_VALUE(x)) throw MakeTypeError(kSimdToNumber);
if (IsPrimitive(v)) return v;
}
var toString = x.toString;
if (IS_CALLABLE(toString)) {
- var s = %_CallFunction(x, toString);
+ var s = %_Call(toString, x);
if (IsPrimitive(s)) return s;
}
throw MakeTypeError(kCannotConvertToPrimitive);
@@ -736,13 +736,13 @@ function DefaultString(x) {
if (IS_SYMBOL(x)) throw MakeTypeError(kSymbolToString);
var toString = x.toString;
if (IS_CALLABLE(toString)) {
- var s = %_CallFunction(x, toString);
+ var s = %_Call(toString, x);
if (IsPrimitive(s)) return s;
}
var valueOf = x.valueOf;
if (IS_CALLABLE(valueOf)) {
- var v = %_CallFunction(x, valueOf);
+ var v = %_Call(valueOf, x);
if (IsPrimitive(v)) return v;
}
}
« no previous file with comments | « src/promise.js ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698