RESOLVED FIXED 18716
SQUIRRELFISH: typeof should return undefined for an undefined variable reference
https://bugs.webkit.org/show_bug.cgi?id=18716
Summary SQUIRRELFISH: typeof should return undefined for an undefined variable reference
Cameron Zwarich (cpst)
Reported 2008-04-24 09:59:55 PDT
The expression "typeof x" throws an exception when x is undefined, but it should return undefined instead. This affects the JavaScriptCore regression tests ecma/Expressions/11.4.1.js and js1_5/Array/regress-157652.js.
Attachments
Proposed patch (1.43 KB, patch)
2008-04-24 10:01 PDT, Cameron Zwarich (cpst)
ggaren: review+
Cameron Zwarich (cpst)
Comment 1 2008-04-24 10:01:55 PDT
Created attachment 20795 [details] Proposed patch This fixes the two tests.
Geoffrey Garen
Comment 2 2008-04-24 10:08:28 PDT
r=me if you use resolveBaseAndProperty instead.
Geoffrey Garen
Comment 3 2008-04-24 10:11:25 PDT
Comment on attachment 20795 [details] Proposed patch Cameron pointed out that resolveBaseAndProperty throws an exception for undefined variables. Doh! r=me
Geoffrey Garen
Comment 4 2008-04-24 10:15:11 PDT
Note You need to log in before you can comment on or make changes to this bug.