RESOLVED FIXED 165227
Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
https://bugs.webkit.org/show_bug.cgi?id=165227
Summary Introduce the concept of Immutable Prototype Exotic Objects to comply with th...
Attachments
proposed patch. (49.43 KB, patch)
2016-12-05 20:01 PST, Mark Lam
saam: review+
Mark Lam
Comment 1 2016-11-30 16:16:27 PST
Mark Lam
Comment 2 2016-12-05 12:29:58 PST
Spec excerpts of relevance: https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object "The Object prototype object is an immutable prototype exotic object." https://html.spec.whatwg.org/#the-windowproxy-exotic-object https://html.spec.whatwg.org/#windowproxy-setprototypeof https://html.spec.whatwg.org/#the-location-interface https://html.spec.whatwg.org/#location-setprototypeof - Based on these WindowProxy and Location both have their [[SetPrototypeOf]] functions unconditionally return false. This differs from the immutable prototype exotic object which allows [[SetPrototypeOf]] to return true if the set value is the same as the existing prototype value.
Mark Lam
Comment 3 2016-12-05 20:01:06 PST
Created attachment 296251 [details] proposed patch.
Saam Barati
Comment 4 2016-12-06 14:37:41 PST
Comment on attachment 296251 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=296251&action=review r=me > LayoutTests/js/script-tests/prototype-assignment.js:36 > + let userAgent = navigator.userAgent; > + if (userAgent.match(/ Chrome\/[0-9]+/)) engine = "chrome"; > + else if (userAgent.match(/ Firefox\/[0-9]+/)) engine = "default"; > + else engine = "safari"; What's the point of this? Don't we already know the answer?
Mark Lam
Comment 5 2016-12-06 14:39:43 PST
Comment on attachment 296251 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=296251&action=review >> LayoutTests/js/script-tests/prototype-assignment.js:36 >> + else engine = "safari"; > > What's the point of this? Don't we already know the answer? This is so I can run this test on Chrome and Firefox to compare results. The test configures the error messages to check below based on the browser it is running on.
Mark Lam
Comment 6 2016-12-06 14:44:20 PST
Thanks for the review. Landed in r209424: <http://trac.webkit.org/r209424>.
Note You need to log in before you can comment on or make changes to this bug.