[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:22:57 PDT 2017


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

--- Comment #2 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
> 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:
> assert at global-lexical-redeclare-variable.js:12:24
> stress/global-lexical-redeclare-variable.js.ftl-eager-no-cjit: global
> code at global-lexical-redeclare-variable.js:112:11
> stress/global-lexical-redeclare-variable.js.ftl-eager-no-cjit: ERROR:
> Unexpected exit code: 3

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.

-- 
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/add32690/attachment.html>


More information about the webkit-unassigned mailing list