Don't use IS_NULL_OR_UNDEFINED() for CHECK_OBJECT_COERCIBLE() because it
will also return true for undetectable objects, but use IS_NULL() and
IS_UNDEFINED() directly, which will only return true for null or
undefined (which matches the semantics of the abstract operation
CheckObjectCoercible).
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/
1287033002
Cr-Commit-Position: refs/heads/master@{#30129}
# Macro for ES6 CheckObjectCoercible
# Will throw a TypeError of the form "[functionName] called on null or undefined".
# Macro for ES6 CheckObjectCoercible
# Will throw a TypeError of the form "[functionName] called on null or undefined".
-macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL_OR_UNDEFINED(arg) && !IS_UNDETECTABLE(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName);
+macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || IS_UNDEFINED(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName);
# Indices in bound function info retrieved by %BoundFunctionGetBindings(...).
define kBoundFunctionIndex = 0;
# Indices in bound function info retrieved by %BoundFunctionGetBindings(...).
define kBoundFunctionIndex = 0;