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

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: ia32, arm and arm64 ports. Misc cleanups. Created 5 years, 4 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
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index 8e7fc6c01c6889a8a5ccecf399ef7a538bafdac4..c20c7372fdca63d8daacf2859717411fdcc77d9d 100644
--- a/src/string.js
+++ b/src/string.js
@@ -248,7 +248,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) {
@@ -315,7 +315,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 {

Powered by Google App Engine
This is Rietveld 408576698