Bug 47788 - Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
Summary: Strict mode: Assignment that would create a global should be a late Reference...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on: 47801
Blocks: 47672
  Show dependency treegraph
 
Reported: 2010-10-17 20:20 PDT by Oliver Hunt
Modified: 2010-11-11 07:34 PST (History)
4 users (show)

See Also:


Attachments
Patch (24.22 KB, patch)
2010-10-17 20:29 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (23.92 KB, patch)
2010-10-17 20:51 PDT, Oliver Hunt
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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