Commit ea6cf207 authored by verwaest's avatar verwaest Committed by Commit bot

Change IS_OBJECT back to typeof == "object" and use IS_SPEC_OBJECT in Array.from and RegExp

BUG=

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

Cr-Commit-Position: refs/heads/master@{#32143}
parent 154ddde4
......@@ -1761,7 +1761,7 @@ function ArrayFrom(arrayLike, mapfn, receiver) {
while (true) {
var next = iterator.next();
if (!IS_OBJECT(next)) {
if (!IS_SPEC_OBJECT(next)) {
throw MakeTypeError(kIteratorResultNotAnObject, next);
}
......
......@@ -95,7 +95,7 @@ macro IS_NUMBER(arg) = (typeof(arg) === 'number');
macro IS_STRING(arg) = (typeof(arg) === 'string');
macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
macro IS_OBJECT(arg) = (typeof(arg) === 'object' && arg !== null);
macro IS_OBJECT(arg) = (typeof(arg) === 'object');
macro IS_ARRAY(arg) = (%_IsArray(arg));
macro IS_DATE(arg) = (%_IsDate(arg));
macro IS_FUNCTION(arg) = (%_IsFunction(arg));
......
......@@ -45,7 +45,7 @@ var RegExpLastMatchInfo = new InternalPackedArray(
// -------------------------------------------------------------------
function IsRegExp(o) {
if (!IS_OBJECT(o)) return false;
if (!IS_SPEC_OBJECT(o)) return false;
var is_regexp = o[matchSymbol];
if (!IS_UNDEFINED(is_regexp)) return TO_BOOLEAN(is_regexp);
return IS_REGEXP(o);
......
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