From fe64313fa6bf9f8a22946f5fea23a8df54251a46 Mon Sep 17 00:00:00 2001 From: "dslomov@chromium.org" Date: Thu, 17 Apr 2014 13:55:03 +0000 Subject: [PATCH] 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 --- src/macros.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macros.py b/src/macros.py index f12c6c8..0035451 100644 --- a/src/macros.py +++ b/src/macros.py @@ -101,7 +101,7 @@ const STRING_TO_REGEXP_CACHE_ID = 0; # values of 'bar'. macro IS_NULL(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_STRING(arg) = (typeof(arg) === 'string'); macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); -- 2.7.4