[Webkit-unassigned] [Bug 164335] New: Getter for Object.prototype which returns this ends up returning undefined
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 2 13:44:06 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=164335
Bug ID: 164335
Summary: Getter for Object.prototype which returns this ends up
returning undefined
Classification: Unclassified
Product: WebKit
Version: Safari 10
Hardware: Unspecified
OS: macOS 10.12
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: fernandesdacostalucas at gmail.com
When adding a property to the `Object.prototype` that returns `this` when it's accessed, `undefined` gets returned.
You can check this by running the following code at `Safari`:
```js
Object.defineProperty(Object.prototype, 'bla', {
get: function() {
return this;
}
});
var anObj = {example: 'foo'};
console.log(anObj.bla);
```
The expected behavior should be to return the object on which we're accessing the property.
PS: You guys at Apple rock, thank you very much for the hard work!
--
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/20161102/a8f0d712/attachment.html>
More information about the webkit-unassigned
mailing list