<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#c2">Comment # 2</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
> stress/global-lexical-redeclare-variable.js.default
>
> stress/global-lexical-redeclare-variable.js.ftl-eager-no-cjit: Exception:
> Error: bad assertion
> stress/global-lexical-redeclare-variable.js.ftl-eager-no-cjit:
> <a href="mailto:assert@global-lexical-redeclare-variable.js">assert@global-lexical-redeclare-variable.js</a>:12:24
> stress/global-lexical-redeclare-variable.js.ftl-eager-no-cjit: global
> <a href="mailto:code@global-lexical-redeclare-variable.js">code@global-lexical-redeclare-variable.js</a>:112:11
> stress/global-lexical-redeclare-variable.js.ftl-eager-no-cjit: ERROR:
> Unexpected exit code: 3</span >
For this particular failure. The test does:
Object.defineProperty(this, 'zoo', {value: undefined, configurable: false, writable: true});
let zoo = 2;
This used to not throw and now it does with my change. This throws in both Firefox and Chrome so I suspect that the test is wrong. The previous code was not throwing when the value was undefined but I believe this was a misinterpretation of the spec which said:
"""
Let existingProp be globalObject.[[GetOwnProperty]](N).
If existingProp is undefined, return false.
"""
My understanding is that this means we should return false if there is no own property N, not if there is a property N whose value is undefined.</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>