Bug 207310
Summary: | Throw a type error upon attempts to redefine undefined and friends on the JSGlobalObject | ||
---|---|---|---|
Product: | WebKit | Reporter: | Robin Morisset <rmorisset> |
Component: | JavaScriptCore | Assignee: | Robin Morisset <rmorisset> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Robin Morisset
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Robin Morisset
<rdar://problem/56658015>
Robin Morisset
Oops, I did not realize that this was already in the bugzilla.
*** This bug has been marked as a duplicate of bug 203456 ***