Bug 47788

Summary: Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: New BugsAssignee: Oliver Hunt <oliver>
Status: RESOLVED FIXED    
Severity: Normal CC: ossy, webkit-ews, webkit.review.bot, yong.li.webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on: 47801    
Bug Blocks: 47672    
Attachments:
Description Flags
Patch
none
Patch sam: review+

Description Oliver Hunt 2010-10-17 20:20:32 PDT
Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
Comment 1 Oliver Hunt 2010-10-17 20:29:52 PDT
Created attachment 70990 [details]
Patch
Comment 2 WebKit Review Bot 2010-10-17 20:31:50 PDT
Attachment 70990 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
JavaScriptCore/interpreter/Interpreter.cpp:2455:  vm_throw is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 1 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Early Warning System Bot 2010-10-17 20:46:50 PDT
Attachment 70990 [details] did not build on qt:
Build output: http://queues.webkit.org/results/4404065
Comment 4 Oliver Hunt 2010-10-17 20:51:50 PDT
Created attachment 70992 [details]
Patch
Comment 5 WebKit Review Bot 2010-10-17 20:54:56 PDT
Attachment 70992 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
JavaScriptCore/interpreter/Interpreter.cpp:2455:  vm_throw is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
Total errors found: 1 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Oliver Hunt 2010-10-17 21:09:36 PDT
Committed r69940: <http://trac.webkit.org/changeset/69940>
Comment 7 Csaba Osztrogon√°c 2010-10-18 00:43:46 PDT
(In reply to comment #6)
> Committed r69940: <http://trac.webkit.org/changeset/69940>
It broke the interpreter build, fix landed in http://trac.webkit.org/changeset/69944
Comment 8 Yong Li 2010-11-10 12:56:39 PST
Seems this has broken non-JIT JS functionality. When assigning a variable in "catch" block, it always throws this exception.

<html>
<script>
try {
   throw "test";
} catch (e1) {
    try {
       var s;
       s = e1.message;
       document.write("succeeded");
    } catch (e2) {
        alert(e2);
    }
}
</script>
<body>
</body>
</html>
Comment 9 Alexey Proskuryakov 2010-11-10 17:13:40 PST
> Seems this has broken non-JIT JS functionality.

Could you please file a bug?
Comment 10 Yong Li 2010-11-11 07:34:50 PST
(In reply to comment #9)
> > Seems this has broken non-JIT JS functionality.
> 
> Could you please file a bug?

Bug 49383 created for this