Commit fe64313f authored by dslomov@chromium.org's avatar dslomov@chromium.org

Change IS_UNDEFINED to perform value comparison instead on typeof check.

This makes our builtins immune to bug v8:3264.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1def20d5
...@@ -101,7 +101,7 @@ const STRING_TO_REGEXP_CACHE_ID = 0; ...@@ -101,7 +101,7 @@ const STRING_TO_REGEXP_CACHE_ID = 0;
# values of 'bar'. # values of 'bar'.
macro IS_NULL(arg) = (arg === null); macro IS_NULL(arg) = (arg === null);
macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); macro IS_NULL_OR_UNDEFINED(arg) = (arg == null);
macro IS_UNDEFINED(arg) = (typeof(arg) === 'undefined'); macro IS_UNDEFINED(arg) = (arg === (void 0));
macro IS_NUMBER(arg) = (typeof(arg) === 'number'); macro IS_NUMBER(arg) = (typeof(arg) === 'number');
macro IS_STRING(arg) = (typeof(arg) === 'string'); macro IS_STRING(arg) = (typeof(arg) === 'string');
macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
......
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