[Webkit-unassigned] [Bug 18717] New: SQUIRRELFISH: eval returns the wrong value for a variable declaration statement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 24 12:41:05 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=18717

           Summary: SQUIRRELFISH: eval returns the wrong value for a
                    variable declaration statement
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: SquirrelFishBlocker
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: cwzwarich at uwaterloo.ca
                CC: mjs at apple.com, ggaren at apple.com, oliver at apple.com
OtherBugsDependingO 18624
             nThis:


The expression eval("var x = 0;") returns 0 instead of undefined. This causes
the JavaScriptCore test ecma_3/Expressions/11.9.6-1.js to fail. Oliver
suggested sending something other than dst to the expression in
VarStatementNode::emitCode(), but that doesn't work, because then eval("f();
var x= 0;") will return the return value of f(). It seems the best way to fix
this is to see if a variable statement is the last statement in a list of
statements, in which case you generate code to overwrite its return value with
undefined.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list