See https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.
<rdar://problem/29442665>
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.
Created attachment 296251 [details] proposed patch.
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?
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.
Thanks for the review. Landed in r209424: <http://trac.webkit.org/r209424>.