[Webkit-unassigned] [Bug 169839] `const location = "foo"` throws in a worker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 17 23:34:22 PDT 2017


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

--- Comment #3 from Chris Dumez <cdumez at apple.com> ---
(In reply to comment #1)
> Created attachment 304864 [details]
> WIP patch
> 
> Causes the following layout test to fail:
> - js/dom/const.html (But this test also fails in Firefox and Chrome in the
> same way so the test may be wrong)
> 
> Causes the following JSC tests to fail:
> ChakraCore.yaml/ChakraCore/test/es6/
> letconst_global_shadow_builtins_nonconfigurable.js.default

> ChakraCore.yaml/ChakraCore/test/es6/
> letconst_global_shadow_builtins_nonconfigurable.js.default: Expected
> uncaught exception with name 'ReferenceError' but exception value is not
> instance of this exception class
> ChakraCore.yaml/ChakraCore/test/es6/
> letconst_global_shadow_builtins_nonconfigurable.js.default: Exception:
> SyntaxError: Can't create duplicate variable that shadows a global property:
> 'undefined'
> ChakraCore.yaml/ChakraCore/test/es6/
> letconst_global_shadow_builtins_nonconfigurable.js.default: ERROR:
> Unexpected exit code: 3

The test looks like:
// Non-configurable global properties are not shadowable.  Instead this causes an early error.
print(undefined); // shouldn't execute
let undefined = "foo";
print(undefined); // shouldn't execute

Previously, the following wouldn't throw:
let undefined = "foo";

With my change, it now throws, which seems to align us with Firefox and Chrome. So I believe this is the behavior change here. However, I am not clear on what the test does with those print() statement and why it says they should not execute.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170318/44e65956/attachment.html>


More information about the webkit-unassigned mailing list