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

Unified Diff: src/js/string.js

Issue 1513223003: [es6] omit callable check if possible, since %_Call already does it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/js/string.js
diff --git a/src/js/string.js b/src/js/string.js
index c838064112f4543dda4e9dc2fb97c0b55d5f6bd3..139bf7a654524aec8060dd3fc6689de60f6655b1 100644
--- a/src/js/string.js
+++ b/src/js/string.js
@@ -162,9 +162,6 @@ function StringMatchJS(pattern) {
if (!IS_NULL_OR_UNDEFINED(pattern)) {
var matcher = pattern[matchSymbol];
if (!IS_UNDEFINED(matcher)) {
- if (!IS_CALLABLE(matcher)) {
- throw MakeTypeError(kCalledNonCallable, matcher);
- }
return %_Call(matcher, pattern, this);
}
}
@@ -572,9 +569,6 @@ function StringSplitJS(separator, limit) {
if (!IS_NULL_OR_UNDEFINED(separator)) {
var splitter = separator[splitSymbol];
if (!IS_UNDEFINED(splitter)) {
- if (!IS_CALLABLE(splitter)) {
- throw MakeTypeError(kCalledNonCallable, splitter);
- }
return %_Call(splitter, separator, this, limit);
}
}
« 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