[Webkit-unassigned] [Bug 203957] New: Getters on global are not invoked with global as this
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 7 08:31:45 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=203957
Bug ID: 203957
Summary: Getters on global are not invoked with global as this
Product: WebKit
Version: Safari 13
Hardware: Macintosh
OS: macOS 10.14
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: medikoo+webkit.org at medikoo.com
Test case:
```
window = this;
(function() { // based on https://mathiasbynens.be/notes/globalthis
'use strict';
Object.defineProperty(Object.prototype, '__magic__', {
get: function() { return this; }
});
print('Is __magic__ a global', __magic__ === window);
print('Is window.__magic__ a global', window.__magic__ === window);
}());
```
eshost-cli output:
$ eshost -s test.js
#### Chakra, SpiderMonkey, V8, V8 --harmony, XS
Is __magic__ a global true
Is window.__magic__ a global true
#### JavaScriptCore
Is __magic__ a global false
Is window.__magic__ a global true
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191107/80398cce/attachment.htm>
More information about the webkit-unassigned
mailing list