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   

Description Robin Morisset 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.
Comment 1 Robin Morisset 2020-02-05 16:44:29 PST
<rdar://problem/56658015>
Comment 2 Robin Morisset 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 ***