Commit 7ae5a4d8 authored by yangguo's avatar yangguo Committed by Commit bot

[es6] omit callable check if possible, since %_Call already does it.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1513223003

Cr-Commit-Position: refs/heads/master@{#32757}
parent e2dd98a3
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment