<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - `const location = "foo"` throws in a worker"
href="https://bugs.webkit.org/show_bug.cgi?id=169839#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - `const location = "foo"` throws in a worker"
href="https://bugs.webkit.org/show_bug.cgi?id=169839">bug 169839</a>
from <span class="vcard"><a class="email" href="mailto:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=169839#c1">comment #1</a>)
<span class="quote">> Created <span class=""><a href="attachment.cgi?id=304864&action=diff" name="attach_304864" title="WIP patch">attachment 304864</a> <a href="attachment.cgi?id=304864&action=edit" title="WIP patch">[details]</a></span>
> 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</span >
<span class="quote">> 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</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>