Bug 207310

Summary: Throw a type error upon attempts to redefine undefined and friends on the JSGlobalObject
Product: WebKit Reporter: Robin Morisset <rmorisset>
Component: JavaScriptCoreAssignee: Robin Morisset <rmorisset>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Robin Morisset
Reported 2020-02-05 16:44:12 PST
According to http://www.ecma-international.org/ecma-262/6.0/index.html#sec-undefined, JSGlobalObject got properties such as "undefined" which are non-writable and non-configurable. So the following code should throw a type error: ``` Object.defineProperty(this, "undefined", { configurable: true, get: function() { return false; } }); ``` And it does in Chrome, but currently does not in Safari.
Attachments
Robin Morisset
Comment 1 2020-02-05 16:44:29 PST
Robin Morisset
Comment 2 2020-02-05 16:45:56 PST
Oops, I did not realize that this was already in the bugzilla. *** This bug has been marked as a duplicate of bug 203456 ***
Note You need to log in before you can comment on or make changes to this bug.