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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 17 16:46:03 PDT 2017


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

            Bug ID: 169839
           Summary: `const location = "foo"` throws in a worker
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cdumez at apple.com

`const location = "foo"` throws in a worker:
SyntaxError: Can't create duplicate variable that shadows a global property: 'location'

It does not throw in Chrome.

location has a "location" property getter on its prototype but does not have an OWN location property. Therefore, Chrome's behavior seems to make more sense.

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


More information about the webkit-unassigned mailing list