[Webkit-unassigned] [Bug 49383] New: assigning to variable in "catch" scope results exception (non-JIT only)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 11 07:34:34 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=49383

           Summary: assigning to variable in "catch" scope results
                    exception (non-JIT only)
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yong.li.webkit at gmail.com


When assigning value to a variable in "catch" block, browser always throws InvalidGlobalAssignment exception. Note: this doesn't happen when using JIT.

It could be an old problem, but become visible since http://trac.webkit.org/changeset/69940.

JSObject* createErrorForInvalidGlobalAssignment(ExecState* exec, const UString& propertyName)
{
   return createReferenceError(exec, makeUString("Strict mode forbids implicit creation of global property '", propertyName, "'"));
} 

A simple test case can reproduce it:

<html>
<script>
try {
   throw "test";
} catch (e1) {
    try {
       var s;
       s = e1.message;
       document.write("succeeded");
    } catch (e2) {
        alert(e2);
    }
}
</script>
<body>
</body>
</html>

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



More information about the webkit-unassigned mailing list