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

Unified Diff: src/string.js

Issue 1316933002: [es6] Initial steps towards a correct implementation of IsCallable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase again. 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/runtime/runtime-proxy.cc ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index 08129584c2b5a1d6739daead4a6d95e33ecb0d7d..1bbc8a69ce1259515bb950d2b259c5269056435a 100644
--- a/src/string.js
+++ b/src/string.js
@@ -250,7 +250,7 @@ function StringReplace(search, replace) {
var lastIndex = search.lastIndex;
TO_INTEGER_FOR_SIDE_EFFECT(lastIndex);
- if (!IS_SPEC_FUNCTION(replace)) {
+ if (!IS_CALLABLE(replace)) {
replace = TO_STRING_INLINE(replace);
if (!search.global) {
@@ -317,7 +317,7 @@ function StringReplace(search, replace) {
var result = %_SubString(subject, 0, start);
// Compute the string to replace with.
- if (IS_SPEC_FUNCTION(replace)) {
+ if (IS_CALLABLE(replace)) {
var receiver = UNDEFINED;
result += %_CallFunction(receiver, search, start, subject, replace);
} else {
« no previous file with comments | « src/runtime/runtime-proxy.cc ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698