<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[209424] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/209424">209424</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2016-12-06 14:43:16 -0800 (Tue, 06 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
https://bugs.webkit.org/show_bug.cgi?id=165227
<rdar://problem/29442665>
Reviewed by Saam Barati.
JSTests:
* stress/get-from-scope-dynamic-onto-proxy.js:
- Updated error message.
* stress/proxy-dont-infinite-loop.js: Removed.
* stress/proxy-json-path.js: Removed.
* stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
- Removed these tests because the issue they are testing relies on being able to
set Object.prototype.__proto__ to something else (which is now not possible).
Source/JavaScriptCore:
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeWithCycleCheck):
- This is where we check for immutable prototype exotic objects and refuse to set
the prototype if needed.
See https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::isImmutablePrototypeExoticObject):
* runtime/Structure.h:
- Add flag for declaring immutable prototype exotic objects.
* runtime/ObjectPrototype.h:
- Declare that Object.prototype is an immutable prototype exotic object.
See https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object.
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorSetPrototypeOf):
- Use better error messages.
Source/WebCore:
Make all objects in window.__proto__'s prototype chain immutable prototype exotic
objects. This gives us roughly equivalent behavior to other browsers.
Firefox's behavior differ slightly in that Firefox will fail any attempted
assignment their __proto__, while the immutable prototype exotic objects will
only fail if the assignment is of a different value. See
https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.
Chrome differs in that assignment to window.__proto__ is also handled like an
immutable prototype exotic object. Instead we adhere to the current HTML spec
that says that the assignment should fail unconditionally. See
https://html.spec.whatwg.org/#the-windowproxy-exotic-object and
https://html.spec.whatwg.org/#windowproxy-setprototypeof.
If the HTML spec is changed to make the WindowProxy and Location objects into
immutable prototype exotic objects later, we can update to match the spec then.
Test: js/prototype-assignment.html
* bindings/js/JSDOMWindowProperties.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GeneratePrototypeDeclaration):
* bindings/scripts/IDLAttributes.txt:
* dom/EventTarget.idl:
* page/DOMWindow.idl:
LayoutTests:
The new prototype-assignment.js test is currently only enabled for LLInt only
run in the JSC tests until webkit.org/b/165401 is fixed.
* TestExpectations:
- Skip js/prototype-assignment.html for now until webkit.org/b/165401 is fixed.
* http/tests/security/window-named-valueOf-expected.txt:
* js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt:
* js/dom/proxy-is-not-allowed-in-global-prototype-chain.html:
- Updated error messages.
* js/prototype-assignment-expected.txt: Added.
* js/prototype-assignment.html: Added.
* js/script-tests/prototype-assignment.js: Added.
(else):
(reportError):
(shouldEqual):
(shouldThrow):
(stringify):
(makeTestID):
(doInternalSetPrototypeOf):
(ordinarySetPrototypeOf):
(setImmutablePrototype):
(windowProxySetPrototypeOf):
(initSetterExpectation):
(throwIfNoExceptionPending):
(objectSetPrototypeOf):
(setUnderscoreProto):
(reflectSetPrototypeOf):
(newObjectProto.toString):
(this.testObject.targets.push.value):
(this.testProxy.targets.push.setPrototypeOf):
(Symbol):
(test):
(runTests):
* js/setPrototypeOf-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJSTestsChangeLog">trunk/JSTests/ChangeLog</a></li>
<li><a href="#trunkJSTestsstressgetfromscopedynamicontoproxyjs">trunk/JSTests/stress/get-from-scope-dynamic-onto-proxy.js</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritywindownamedvalueOfexpectedtxt">trunk/LayoutTests/http/tests/security/window-named-valueOf-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomproxyisnotallowedinglobalprototypechainexpectedtxt">trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomproxyisnotallowedinglobalprototypechainhtml">trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain.html</a></li>
<li><a href="#trunkLayoutTestsjssetPrototypeOfexpectedtxt">trunk/LayoutTests/js/setPrototypeOf-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSTypeInfoh">trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectConstructorcpp">trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectPrototypeh">trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStructureh">trunk/Source/JavaScriptCore/runtime/Structure.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowPropertiesh">trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCoredomEventTargetidl">trunk/Source/WebCore/dom/EventTarget.idl</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsprototypeassignmentexpectedtxt">trunk/LayoutTests/js/prototype-assignment-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsprototypeassignmenthtml">trunk/LayoutTests/js/prototype-assignment.html</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsprototypeassignmentjs">trunk/LayoutTests/js/script-tests/prototype-assignment.js</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkJSTestsstressproxydontinfiniteloopjs">trunk/JSTests/stress/proxy-dont-infinite-loop.js</a></li>
<li><a href="#trunkJSTestsstressproxyjsonpathjs">trunk/JSTests/stress/proxy-json-path.js</a></li>
<li><a href="#trunkJSTestsstressrestparameterallocationeliminationwatchpoints6js">trunk/JSTests/stress/rest-parameter-allocation-elimination-watchpoints-6.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJSTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChangeLog (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChangeLog        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/JSTests/ChangeLog        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-12-06 Mark Lam <mark.lam@apple.com>
+
+ Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
+ https://bugs.webkit.org/show_bug.cgi?id=165227
+ <rdar://problem/29442665>
+
+ Reviewed by Saam Barati.
+
+ * stress/get-from-scope-dynamic-onto-proxy.js:
+ - Updated error message.
+
+ * stress/proxy-dont-infinite-loop.js: Removed.
+ * stress/proxy-json-path.js: Removed.
+ * stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
+ - Removed these tests because the issue they are testing relies on being able to
+ set Object.prototype.__proto__ to something else (which is now not possible).
+
</ins><span class="cx"> 2016-12-05 Caitlin Potter <caitp@igalia.com>
</span><span class="cx">
</span><span class="cx"> [JSC] report unexpected token when "async" is followed by identifier
</span></span></pre></div>
<a id="trunkJSTestsstressgetfromscopedynamicontoproxyjs"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/stress/get-from-scope-dynamic-onto-proxy.js (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/stress/get-from-scope-dynamic-onto-proxy.js        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/JSTests/stress/get-from-scope-dynamic-onto-proxy.js        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -103,4 +103,4 @@
</span><span class="cx"> thrown = e;
</span><span class="cx"> }
</span><span class="cx"> Object.prototype.__proto__ = null;
</span><del>-shouldBe(String(thrown), `Error: NG`);
</del><ins>+shouldBe(String(thrown), `TypeError: Cannot set prototype of immutable prototype object`);
</ins></span></pre></div>
<a id="trunkJSTestsstressproxydontinfiniteloopjs"></a>
<div class="delfile"><h4>Deleted: trunk/JSTests/stress/proxy-dont-infinite-loop.js (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/stress/proxy-dont-infinite-loop.js        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/JSTests/stress/proxy-dont-infinite-loop.js        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,17 +0,0 @@
</span><del>-function foo() {
- let target = {
- __proto__: null
- };
- let proxy = new Proxy(target, {
- get(...args) {
- return Reflect.get(...args);
- }
- });
- Object.prototype.__proto__ = {
- __proto__: proxy,
- };
-
- let a = {};
- a.test;
-}
-foo();
</del></span></pre></div>
<a id="trunkJSTestsstressproxyjsonpathjs"></a>
<div class="delfile"><h4>Deleted: trunk/JSTests/stress/proxy-json-path.js (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/stress/proxy-json-path.js        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/JSTests/stress/proxy-json-path.js        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-var target = { __proto__: null };
-var handler = {
- get: function ()
- {
- throw new Error(`ng`);
- }
-};
-
-var thrown = null;
-var hello = 42;
-// As a result, global object automatically inherit this proxy.
-Object.prototype.__proto__ = {
- __proto__: new Proxy(target, handler)
-};
-
-try {
- loadString(`hello = {"hello":"world"};proxy.ok = {}`);
-} catch (error) {
- thrown = error;
-}
-Object.prototype.__proto__ = null;
-if (thrown === null)
- throw new Error(`not thrown`);
-if (String(thrown) !== `Error: ng`)
- throw new Error(`bad error: ${String(thrown)}`);
</del></span></pre></div>
<a id="trunkJSTestsstressrestparameterallocationeliminationwatchpoints6js"></a>
<div class="delfile"><h4>Deleted: trunk/JSTests/stress/rest-parameter-allocation-elimination-watchpoints-6.js (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/stress/rest-parameter-allocation-elimination-watchpoints-6.js        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/JSTests/stress/rest-parameter-allocation-elimination-watchpoints-6.js        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,24 +0,0 @@
</span><del>-function assert(b) {
- if (!b)
- throw new Error;
-}
-noInline(assert);
-
-function foo(...args) {
- return args[0];
-}
-noInline(foo);
-
-for (let i = 0; i < 10000; i++) {
- // Warm it up on both in bound and out of bound accesses.
- if (i % 2)
- assert(foo(i) === i);
- else
- assert(foo() === undefined);
-}
-
-let newProto = [50];
-newProto.__proto__ = null;
-Object.prototype.__proto__ = newProto;
-for (let i = 0; i < 10000; i++)
- assert(foo() === 50);
</del></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/LayoutTests/ChangeLog        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2016-12-06 Mark Lam <mark.lam@apple.com>
+
+ Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
+ https://bugs.webkit.org/show_bug.cgi?id=165227
+ <rdar://problem/29442665>
+
+ Reviewed by Saam Barati.
+
+ The new prototype-assignment.js test is currently only enabled for LLInt only
+ run in the JSC tests until webkit.org/b/165401 is fixed.
+
+ * TestExpectations:
+ - Skip js/prototype-assignment.html for now until webkit.org/b/165401 is fixed.
+
+ * http/tests/security/window-named-valueOf-expected.txt:
+ * js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt:
+ * js/dom/proxy-is-not-allowed-in-global-prototype-chain.html:
+ - Updated error messages.
+
+ * js/prototype-assignment-expected.txt: Added.
+ * js/prototype-assignment.html: Added.
+ * js/script-tests/prototype-assignment.js: Added.
+ (else):
+ (reportError):
+ (shouldEqual):
+ (shouldThrow):
+ (stringify):
+ (makeTestID):
+ (doInternalSetPrototypeOf):
+ (ordinarySetPrototypeOf):
+ (setImmutablePrototype):
+ (windowProxySetPrototypeOf):
+ (initSetterExpectation):
+ (throwIfNoExceptionPending):
+ (objectSetPrototypeOf):
+ (setUnderscoreProto):
+ (reflectSetPrototypeOf):
+ (newObjectProto.toString):
+ (this.testObject.targets.push.value):
+ (this.testProxy.targets.push.setPrototypeOf):
+ (Symbol):
+ (test):
+ (runTests):
+ * js/setPrototypeOf-expected.txt:
+
</ins><span class="cx"> 2016-12-06 Dave Hyatt <hyatt@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (Safari 10): Scrolling not working inside height 100% table
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/LayoutTests/TestExpectations        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -640,6 +640,8 @@
</span><span class="cx">
</span><span class="cx"> [ Debug ] js/regress-141098.html [ Slow ]
</span><span class="cx">
</span><ins>+webkit.org/b/165401 js/prototype-assignment.html [ Skip ]
+
</ins><span class="cx"> # IDBVersionChangeEvent tests need to be rewritten to use event constructors instead of createEvent,
</span><span class="cx"> # after we implement the IDBVersionChangeEvent constructor.
</span><span class="cx"> webkit.org/b/145390 storage/indexeddb/events.html [ Failure ]
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritywindownamedvalueOfexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/window-named-valueOf-expected.txt (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/window-named-valueOf-expected.txt        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/LayoutTests/http/tests/security/window-named-valueOf-expected.txt        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: line 1: Threw exception: TypeError: Illegal constructor
</del><ins>+CONSOLE MESSAGE: line 1: Threw exception: TypeError: Cannot set prototype of immutable prototype object
</ins><span class="cx"> This passes if it doesn't alert the contents of innocent-victim.
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomproxyisnotallowedinglobalprototypechainexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,3 +1,2 @@
</span><del>-CONSOLE MESSAGE: TypeError: Proxy is not allowed in the global prototype chain.
-onerror saw TypeError: Proxy is not allowed in the global prototype chain.
</del><ins>+Caught: TypeError: Cannot set prototype of immutable prototype object
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomproxyisnotallowedinglobalprototypechainhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain.html (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain.html        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/LayoutTests/js/dom/proxy-is-not-allowed-in-global-prototype-chain.html        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -18,7 +18,6 @@
</span><span class="cx">
</span><span class="cx"> } catch (e) {
</span><span class="cx"> log("Caught: " + e);
</span><del>- log(e.stack);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function log(s)
</span></span></pre></div>
<a id="trunkLayoutTestsjsprototypeassignmentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/prototype-assignment-expected.txt (0 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/prototype-assignment-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/prototype-assignment-expected.txt        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsprototypeassignmenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/prototype-assignment.html (0 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/prototype-assignment.html         (rev 0)
+++ trunk/LayoutTests/js/prototype-assignment.html        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="script-tests/prototype-assignment.js"></script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsprototypeassignmentjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/script-tests/prototype-assignment.js (0 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/prototype-assignment.js         (rev 0)
+++ trunk/LayoutTests/js/script-tests/prototype-assignment.js        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -0,0 +1,438 @@
</span><ins>+//@ runFTLNoCJIT("--useJIT=false")
+// FIXME: Remove the "--useJIT=false" option when https://bugs.webkit.org/show_bug.cgi?id=165401 is fixed.
+
+// This test suite compares the behavior of setting the prototype on various values
+// (using Object.setPrototypeOf(), obj.__proto__ assignment, and Reflect.setPrototypeOf())
+// against what is specified in the ES spec. The expected behavior specified according
+// to the spec is expressed in expectationsForObjectSetPrototypeOf,
+// expectationsForSetUnderscoreProto, and expectationsForReflectSetPrototypeOf.
+
+
+var inBrowser = (typeof window != "undefined");
+
+// Test configuration options:
+var verbose = false;
+var maxIterations = 1;
+var throwOnEachError = true;
+
+var testUndefined = true;
+var testNull = true;
+var testTrue = true;
+var testFalse = true;
+var testNumbers = true;
+var testString = true;
+var testSymbol = true;
+var testObject = true;
+var testGlobal = true;
+var testWindowProtos = inBrowser;
+
+//====================================================================================
+// Error messages:
+
+if (inBrowser) {
+ let userAgent = navigator.userAgent;
+ if (userAgent.match(/ Chrome\/[0-9]+/)) engine = "chrome";
+ else if (userAgent.match(/ Firefox\/[0-9]+/)) engine = "default";
+ else engine = "safari";
+} else
+ engine = "jsc";
+
+// Set default error messages and then override with engine specific ones below.
+DefaultTypeError = "TypeError: ";
+CannotSetPrototypeOfImmutablePrototypeObject = DefaultTypeError;
+CannotSetPrototypeOfThisObject = DefaultTypeError;
+CannotSetPrototypeOfUndefinedOrNull = DefaultTypeError;
+CannotSetPrototypeOfNonObject = DefaultTypeError;
+PrototypeValueCanOnlyBeAnObjectOrNull = DefaultTypeError;
+ObjectProtoCalledOnNullOrUndefinedError = DefaultTypeError;
+ReflectSetPrototypeOfRequiresTheFirstArgumentBeAnObject = DefaultTypeError;
+ReflectSetPrototypeOfRequiresTheSecondArgumentBeAnObjectOrNull = DefaultTypeError;
+
+if (engine == "jsc" || engine === "safari") {
+ CannotSetPrototypeOfImmutablePrototypeObject = "TypeError: Cannot set prototype of immutable prototype object";
+ CannotSetPrototypeOfThisObject = "TypeError: Cannot set prototype of this object";
+ CannotSetPrototypeOfUndefinedOrNull = "TypeError: Cannot set prototype of undefined or null";
+ CannotSetPrototypeOfNonObject = "TypeError: Cannot set prototype of non-object";
+ PrototypeValueCanOnlyBeAnObjectOrNull = "TypeError: Prototype value can only be an object or null";
+ ObjectProtoCalledOnNullOrUndefinedError = "TypeError: Object.prototype.__proto__ called on null or undefined";
+ ReflectSetPrototypeOfRequiresTheFirstArgumentBeAnObject = "TypeError: Reflect.setPrototypeOf requires the first argument be an object";
+ ReflectSetPrototypeOfRequiresTheSecondArgumentBeAnObjectOrNull = "TypeError: Reflect.setPrototypeOf requires the second argument be either an object or null";
+} else if (engine === "chrome") {
+ CannotSetPrototypeOfImmutablePrototypeObject = "TypeError: Immutable prototype object ";
+}
+
+//====================================================================================
+// Utility functions:
+
+if (inBrowser)
+ print = console.log;
+
+function reportError(errorMessage) {
+ if (throwOnEachError)
+ throw errorMessage;
+ else
+ print(errorMessage);
+}
+
+function shouldEqual(testID, resultType, actual, expected) {
+ if (actual != expected)
+ reportError("ERROR in " + resultType
+ + ": expect " + stringify(expected) + ", actual " + stringify(actual)
+ + " in test: " + testID.signature + " on iteration " + testID.iteration);
+}
+
+function shouldThrow(testID, resultType, actual, expected) {
+ let actualStr = "" + actual;
+ if (!actualStr.startsWith(expected))
+ reportError("ERROR in " + resultType
+ + ": expect " + expected + ", actual " + actual
+ + " in test: " + testID.signature + " on iteration " + testID.iteration);
+}
+
+function stringify(value) {
+ if (typeof value == "string") return '"' + value + '"';
+ if (typeof value == "symbol") return value.toString();
+
+ if (value === origGlobalProto) return "origGlobalProto";
+ if (value === origObjectProto) return "origObjectProto";
+ if (value === newObjectProto) return "newObjectProto";
+ if (value === proxyObject) return "proxyObject";
+
+ if (value === null) return "null";
+ if (typeof value == "object") return "object";
+ return "" + value;
+}
+
+function makeTestID(index, iteration, targetName, protoToSet, protoSetter, expected) {
+ let testID = {};
+ testID.signature = "[" + index + "] "
+ + protoSetter.actionName + "|"
+ + targetName + "|"
+ + stringify(protoToSet) + "|"
+ + stringify(expected.result) + "|"
+ + stringify(expected.proto) + "|"
+ + stringify(expected.exception);
+ testID.iteration = iteration;
+ return testID;
+}
+
+//====================================================================================
+// Functions to express the expectations of the ES specification:
+
+function doInternalSetPrototypeOf(result, target, origProto, newProto) {
+ if (!target.setPrototypeOf) {
+ result.success = true;
+ result.exception = undefined;
+ return;
+ }
+ target.setPrototypeOf(result, origProto, newProto);
+}
+
+// 9.1.2.1 OrdinarySetPrototypeOf ( O, V )
+// https://tc39.github.io/ecma262/#sec-ordinarysetprototypeof
+function ordinarySetPrototypeOf(result, currentProto, newProto) {
+ // 9.1.2.1-4 If SameValue(V, current) is true, return true.
+ if (newProto === currentProto) {
+ result.success = true;
+ return;
+ }
+ // 9.1.2.1-5 [extensibility check not tested here]
+ // 9.1.2.1-8 [cycle check not tested here]
+ result.success = true;
+}
+
+// 9.4.7.2 SetImmutablePrototype ( O, V )
+// https://tc39.github.io/ecma262/#sec-set-immutable-prototype
+function setImmutablePrototype(result, currentProto, newProto) {
+ if (newProto === currentProto) {
+ result.success = true;
+ return;
+ }
+ result.success = false;
+ result.exception = CannotSetPrototypeOfImmutablePrototypeObject;
+}
+
+// HTML spec: 7.4.2 [[SetPrototypeOf]] ( V )
+// https://html.spec.whatwg.org/#windowproxy-setprototypeof
+function windowProxySetPrototypeOf(result, currentProto, newProto) {
+ result.success = false;
+ result.exception = CannotSetPrototypeOfThisObject;
+}
+
+
+var count = 0;
+function initSetterExpectation(target, newProto) {
+ var targetValue = target.value();
+ var origProto = undefined;
+ if (targetValue != null && targetValue != undefined)
+ origProto = targetValue.__proto__; // Default to old proto.
+
+ var expected = {};
+ expected.targetValue = targetValue;
+ expected.origProto = origProto;
+ expected.exception = undefined;
+ expected.proto = origProto;
+ expected.result = undefined;
+
+ return expected;
+}
+
+// 19.1.2.21 Object.setPrototypeOf ( O, proto )
+// https://tc39.github.io/ecma262/#sec-object.setprototypeof
+function objectSetPrototypeOf(target, newProto) {
+ let expected = initSetterExpectation(target, newProto);
+ var targetValue = expected.targetValue;
+ var origProto = expected.origProto;
+
+ function throwIfNoExceptionPending(e) {
+ if (!expected.exception)
+ expected.exception = e;
+ }
+
+ // 19.1.2.21-1 Let O be ? RequireObjectCoercible(O).
+ if (targetValue == undefined || targetValue == null)
+ throwIfNoExceptionPending(CannotSetPrototypeOfUndefinedOrNull);
+
+ // 19.1.2.21-2 If Type(proto) is neither Object nor Null, throw a TypeError exception.
+ if (typeof newProto != "object")
+ throwIfNoExceptionPending(PrototypeValueCanOnlyBeAnObjectOrNull);
+
+ // 19.1.2.21-3 If Type(O) is not Object, return O.
+ else if (typeof targetValue != "object")
+ expected.result = targetValue;
+
+ // 19.1.2.21-4 Let status be ? O.[[SetPrototypeOf]](proto).
+ else {
+ // 19.1.2.21-5 If status is false, throw a TypeError exception.
+ let result = {};
+ doInternalSetPrototypeOf(result, target, origProto, newProto);
+ if (result.success)
+ expected.proto = newProto;
+ else
+ throwIfNoExceptionPending(result.exception);
+
+ // 19.1.2.21-6 Return O.
+ expected.result = targetValue;
+ }
+
+ return expected;
+}
+objectSetPrototypeOf.action = (obj, newProto) => Object.setPrototypeOf(obj, newProto);
+objectSetPrototypeOf.actionName = "Object.setPrototypeOf";
+
+
+// B.2.2.1.2 set Object.prototype.__proto__
+// https://tc39.github.io/ecma262/#sec-set-object.prototype.__proto__
+function setUnderscoreProto(target, newProto) {
+ let expected = initSetterExpectation(target, newProto);
+ var targetValue = expected.targetValue;
+ var origProto = expected.origProto;
+
+ function throwIfNoExceptionPending(e) {
+ if (!expected.exception)
+ expected.exception = e;
+ }
+
+ // B.2.2.1.2-1 Let O be ? RequireObjectCoercible(this value).
+ if (targetValue == undefined || targetValue == null)
+ throwIfNoExceptionPending(DefaultTypeError);
+
+ // B.2.2.1.2-2 If Type(proto) is neither Object nor Null, return undefined.
+ if (typeof newProto != "object")
+ expected.result = undefined;
+
+ // B.2.2.1.2-3 If Type(O) is not Object, return undefined.
+ else if (typeof targetValue != "object")
+ expected.result = undefined;
+
+ // B.2.2.1.2-4 Let status be ? O.[[SetPrototypeOf]](proto).
+ else {
+ // B.2.2.1.2-5 If status is false, throw a TypeError exception.
+ let result = {};
+ doInternalSetPrototypeOf(result, target, origProto, newProto);
+ if (result.success)
+ expected.proto = newProto;
+ else
+ throwIfNoExceptionPending(result.exception);
+
+ // B.2.2.1.2-6 Return undefined.
+ expected.result = undefined;
+ }
+
+ // Override the result to be the newProto value because the statement obj.__proto__ = value
+ // will produce the rhs value, not the result of the obj.__proto__ setter.
+ expected.result = newProto;
+ return expected;
+}
+setUnderscoreProto.action = (obj, newProto) => (obj.__proto__ = newProto);
+setUnderscoreProto.actionName = "obj.__proto__";
+
+
+// 26.1.13 Reflect.setPrototypeOf ( target, proto )
+// https://tc39.github.io/ecma262/#sec-reflect.setprototypeof
+// function expectationsForReflectSetPrototypeOf(target, newProto, targetExpectation) {
+function reflectSetPrototypeOf(target, newProto) {
+ let expected = initSetterExpectation(target, newProto);
+ var targetValue = expected.targetValue;
+ var origProto = expected.origProto;
+
+ function throwIfNoExceptionPending(e) {
+ if (!expected.exception)
+ expected.exception = e;
+ }
+
+ // 26.1.13-1 If Type(target) is not Object, throw a TypeError exception.
+ if (targetValue === null || typeof targetValue != "object")
+ throwIfNoExceptionPending(ReflectSetPrototypeOfRequiresTheFirstArgumentBeAnObject);
+
+ // 26.1.13-2 If Type(proto) is not Object and proto is not null, throw a TypeError exception.
+ if (typeof newProto != "object")
+ throwIfNoExceptionPending(ReflectSetPrototypeOfRequiresTheSecondArgumentBeAnObjectOrNull);
+
+ // 26.1.13-3 Return ? target.[[SetPrototypeOf]](proto).
+ let result = {};
+ doInternalSetPrototypeOf(result, target, origProto, newProto);
+ expected.result = result.success;
+ if (result.success)
+ expected.proto = newProto;
+
+ return expected;
+}
+reflectSetPrototypeOf.action = (obj, newProto) => Reflect.setPrototypeOf(obj, newProto);
+reflectSetPrototypeOf.actionName = "Reflect.setPrototypeOf";
+
+
+//====================================================================================
+// Test Data:
+
+var global = this;
+var origGlobalProto = global.__proto__;
+var origObjectProto = {}.__proto__;
+var proxyObject = new Proxy({ }, {
+ setPrototypeOf(target, value) {
+ throw "Thrown from proxy";
+ }
+});
+var newObjectProto = { toString() { return "newObjectProto"; } };
+
+var targets = [];
+
+if (this.testUndefined) targets.push({ name: "undefined", value: () => undefined });
+if (this.testNull) targets.push({ name: "null", value: () => null });
+if (this.testTrue) targets.push({ name: "true", value: () => true });
+if (this.testFalse) targets.push({ name: "false", value: () => false });
+
+if (this.testNumbers) {
+ targets.push({ name: "0", value: () => 0 });
+ targets.push({ name: "11", value: () => 11 });
+ targets.push({ name: "123.456", value: () => 123.456 });
+}
+
+if (this.testString) targets.push({ name: '"doh"', value: () => "doh" });
+if (this.testSymbol) targets.push({ name: "Symbol(doh)", value: () => Symbol("doh") });
+
+if (this.testObject) {
+ targets.push({
+ name: "{}",
+ value: () => {},
+ setPrototypeOf: ordinarySetPrototypeOf
+ });
+ targets.push({
+ name: "{}.__proto__",
+ value: () => origObjectProto,
+ setPrototypeOf: setImmutablePrototype
+ });
+}
+if (this.testGlobal) {
+ targets.push({
+ name: inBrowser ? "window" : "global",
+ value: () => global,
+ setPrototypeOf: windowProxySetPrototypeOf
+ });
+}
+if (this.testWindowProtos) {
+ if (inBrowser) {
+ let depth = 1;
+ let proto = window.__proto__;
+ while (proto) {
+ let name = "window";
+ for (var i = 0; i < depth; i++)
+ name += ".__proto__";
+
+ let currentProto = proto;
+ targets.push({
+ name: name,
+ value: () => currentProto,
+ setPrototypeOf: setImmutablePrototype
+ });
+
+ proto = proto.__proto__;
+ depth++;
+ }
+ }
+}
+
+
+var newProtos = [
+ undefined,
+ null,
+ true,
+ false,
+ 0,
+ 11,
+ 123.456,
+ "doh",
+ Symbol("doh"),
+ {},
+ origObjectProto,
+ origGlobalProto,
+ newObjectProto
+];
+
+var protoSetters = [
+ objectSetPrototypeOf,
+ setUnderscoreProto,
+ reflectSetPrototypeOf,
+];
+
+
+//====================================================================================
+// Test driver functions:
+
+function test(testID, targetValue, newProto, setterAction, expected) {
+ let exception = undefined;
+ let result = undefined;
+ try {
+ result = setterAction(targetValue, newProto);
+ } catch (e) {
+ exception = e;
+ }
+ shouldThrow(testID, "exception", exception, expected.exception);
+ if (!expected.exception) {
+ shouldEqual(testID, "__proto__", targetValue.__proto__, expected.proto);
+ shouldEqual(testID, "result", result, expected.result);
+ }
+}
+
+function runTests() {
+ let testIndex = 0;
+ for (protoSetter of protoSetters) {
+ for (target of targets) {
+ for (newProto of newProtos) {
+ let currentTestIndex = testIndex++;
+ for (var i = 0; i < maxIterations; i++) {
+ let expected = protoSetter(target, newProto);
+ let targetValue = expected.targetValue;
+
+ let testID = makeTestID(currentTestIndex, i, target.name, newProto, protoSetter, expected);
+ if (verbose && i == 0)
+ print("test: " + testID.signature);
+
+ test(testID, targetValue, newProto, protoSetter.action, expected);
+ }
+ }
+ }
+ }
+}
+
+runTests();
</ins></span></pre></div>
<a id="trunkLayoutTestsjssetPrototypeOfexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/setPrototypeOf-expected.txt (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/setPrototypeOf-expected.txt        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/LayoutTests/js/setPrototypeOf-expected.txt        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -30,87 +30,87 @@
</span><span class="cx"> PASS Object.getPrototypeOf(value) is (value).__proto__
</span><span class="cx">
</span><span class="cx"> Non-Coercible value
</span><del>-PASS Object.setPrototypeOf(undefined, {}) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(null, {}) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(undefined, {}) threw exception TypeError: Cannot set prototype of undefined or null.
+PASS Object.setPrototypeOf(null, {}) threw exception TypeError: Cannot set prototype of undefined or null.
</ins><span class="cx">
</span><span class="cx"> Non-Object/Null proto
</span><span class="cx"> object (Function)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Function2)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Object)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Object2)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (RegExp)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Array)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Error)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Date)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Number)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (Boolean)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx"> object (String)
</span><del>-PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, true) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, false) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Type error.
-PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Type error.
</del><ins>+PASS Object.setPrototypeOf(object, 0) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, true) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, false) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, 'string') threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, Symbol()) threw exception TypeError: Prototype value can only be an object or null.
+PASS Object.setPrototypeOf(object, undefined) threw exception TypeError: Prototype value can only be an object or null.
</ins><span class="cx">
</span><span class="cx"> Object and object proto
</span><span class="cx"> object (Function) proto (Function)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-12-06 Mark Lam <mark.lam@apple.com>
+
+ Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
+ https://bugs.webkit.org/show_bug.cgi?id=165227
+ <rdar://problem/29442665>
+
+ Reviewed by Saam Barati.
+
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::setPrototypeWithCycleCheck):
+ - This is where we check for immutable prototype exotic objects and refuse to set
+ the prototype if needed.
+ See https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.
+
+ * runtime/JSTypeInfo.h:
+ (JSC::TypeInfo::isImmutablePrototypeExoticObject):
+ * runtime/Structure.h:
+ - Add flag for declaring immutable prototype exotic objects.
+
+ * runtime/ObjectPrototype.h:
+ - Declare that Object.prototype is an immutable prototype exotic object.
+ See https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object.
+
+ * runtime/ObjectConstructor.cpp:
+ (JSC::objectConstructorSetPrototypeOf):
+ - Use better error messages.
+
</ins><span class="cx"> 2016-12-04 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Use ASCIICType more, and improve it a little bit
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1393,6 +1393,9 @@
</span><span class="cx"> if (this->getPrototypeDirect() == prototype)
</span><span class="cx"> return true;
</span><span class="cx">
</span><ins>+ if (this->structure(vm)->isImmutablePrototypeExoticObject())
+ return typeError(exec, scope, shouldThrowIfCantSet, ASCIILiteral("Cannot set prototype of immutable prototype object"));
+
</ins><span class="cx"> bool isExtensible = this->isExtensible(exec);
</span><span class="cx"> RETURN_IF_EXCEPTION(scope, false);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSTypeInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> static const unsigned ProhibitsPropertyCaching = 1 << 10;
</span><span class="cx"> static const unsigned GetOwnPropertySlotIsImpure = 1 << 11;
</span><span class="cx"> static const unsigned NewImpurePropertyFiresWatchpoints = 1 << 12;
</span><ins>+static const unsigned IsImmutablePrototypeExoticObject = 1 << 13;
</ins><span class="cx"> static const unsigned GetOwnPropertySlotIsImpureForPropertyAbsence = 1 << 14;
</span><span class="cx"> static const unsigned InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero = 1 << 15;
</span><span class="cx">
</span><span class="lines">@@ -90,6 +91,7 @@
</span><span class="cx"> bool getOwnPropertySlotIsImpure() const { return isSetOnFlags2(GetOwnPropertySlotIsImpure); }
</span><span class="cx"> bool getOwnPropertySlotIsImpureForPropertyAbsence() const { return isSetOnFlags2(GetOwnPropertySlotIsImpureForPropertyAbsence); }
</span><span class="cx"> bool newImpurePropertyFiresWatchpoints() const { return isSetOnFlags2(NewImpurePropertyFiresWatchpoints); }
</span><ins>+ bool isImmutablePrototypeExoticObject() const { return isSetOnFlags2(IsImmutablePrototypeExoticObject); }
</ins><span class="cx"> bool interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero() const { return isSetOnFlags2(InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero); }
</span><span class="cx">
</span><span class="cx"> static ptrdiff_t flagsOffset()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -176,11 +176,11 @@
</span><span class="cx">
</span><span class="cx"> JSValue objectValue = exec->argument(0);
</span><span class="cx"> if (objectValue.isUndefinedOrNull())
</span><del>- return throwVMTypeError(exec, scope);
</del><ins>+ return throwVMTypeError(exec, scope, ASCIILiteral("Cannot set prototype of undefined or null"));
</ins><span class="cx">
</span><span class="cx"> JSValue protoValue = exec->argument(1);
</span><span class="cx"> if (!protoValue.isObject() && !protoValue.isNull())
</span><del>- return throwVMTypeError(exec, scope);
</del><ins>+ return throwVMTypeError(exec, scope, ASCIILiteral("Prototype value can only be an object or null"));
</ins><span class="cx">
</span><span class="cx"> JSObject* object = objectValue.toObject(exec);
</span><span class="cx"> RETURN_IF_EXCEPTION(scope, encodedJSValue());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectPrototypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/JavaScriptCore/runtime/ObjectPrototype.h        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> class ObjectPrototype : public JSNonFinalObject {
</span><span class="cx"> public:
</span><span class="cx"> typedef JSNonFinalObject Base;
</span><ins>+ static const unsigned StructureFlags = Base::StructureFlags | IsImmutablePrototypeExoticObject;
</ins><span class="cx">
</span><span class="cx"> static ObjectPrototype* create(VM&, JSGlobalObject*, Structure*);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStructureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Structure.h (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Structure.h        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/JavaScriptCore/runtime/Structure.h        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -220,6 +220,11 @@
</span><span class="cx"> && typeInfo().newImpurePropertyFiresWatchpoints();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ bool isImmutablePrototypeExoticObject()
+ {
+ return typeInfo().isImmutablePrototypeExoticObject();
+ }
+
</ins><span class="cx"> // We use SlowPath in GetByIdStatus for structures that may get new impure properties later to prevent
</span><span class="cx"> // DFG from inlining property accesses since structures don't transition when a new impure property appears.
</span><span class="cx"> bool takesSlowPathInDFGForImpureProperty()
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/WebCore/ChangeLog        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2016-12-06 Mark Lam <mark.lam@apple.com>
+
+ Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
+ https://bugs.webkit.org/show_bug.cgi?id=165227
+ <rdar://problem/29442665>
+
+ Reviewed by Saam Barati.
+
+ Make all objects in window.__proto__'s prototype chain immutable prototype exotic
+ objects. This gives us roughly equivalent behavior to other browsers.
+
+ Firefox's behavior differ slightly in that Firefox will fail any attempted
+ assignment their __proto__, while the immutable prototype exotic objects will
+ only fail if the assignment is of a different value. See
+ https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.
+
+ Chrome differs in that assignment to window.__proto__ is also handled like an
+ immutable prototype exotic object. Instead we adhere to the current HTML spec
+ that says that the assignment should fail unconditionally. See
+ https://html.spec.whatwg.org/#the-windowproxy-exotic-object and
+ https://html.spec.whatwg.org/#windowproxy-setprototypeof.
+
+ If the HTML spec is changed to make the WindowProxy and Location objects into
+ immutable prototype exotic objects later, we can update to match the spec then.
+
+ Test: js/prototype-assignment.html
+
+ * bindings/js/JSDOMWindowProperties.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateHeader):
+ (GeneratePrototypeDeclaration):
+ * bindings/scripts/IDLAttributes.txt:
+ * dom/EventTarget.idl:
+ * page/DOMWindow.idl:
+
</ins><span class="cx"> 2016-12-06 Andreas Kling <akling@apple.com>
</span><span class="cx">
</span><span class="cx"> [Cocoa] Add some memory usage related information to sysdiagnose state dumps
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowPropertiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.h (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.h        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowProperties.h        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
</span><span class="cx"> static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
</span><span class="cx">
</span><del>- static const unsigned StructureFlags = JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
</del><ins>+ static const unsigned StructureFlags = JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::IsImmutablePrototypeExoticObject | Base::StructureFlags;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> JSDOMWindowProperties(JSC::Structure* structure, JSC::JSGlobalObject& globalObject)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -1570,6 +1570,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> $structureFlags{"JSC::NewImpurePropertyFiresWatchpoints"} = 1 if $interface->extendedAttributes->{NewImpurePropertyFiresWatchpoints};
</span><ins>+ $structureFlags{"JSC::IsImmutablePrototypeExoticObject"} = 1 if $interface->extendedAttributes->{IsImmutablePrototypeExoticObject};
</ins><span class="cx"> $structureFlags{"JSC::TypeOfShouldCallGetCallData"} = 1 if $interface->extendedAttributes->{CustomCall};
</span><span class="cx">
</span><span class="cx"> # Getters
</span><span class="lines">@@ -5744,6 +5745,8 @@
</span><span class="cx"> push(@$outputArray, " static bool defineOwnProperty(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, const JSC::PropertyDescriptor&, bool shouldThrow);\n");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ $structureFlags{"JSC::IsImmutablePrototypeExoticObject"} = 1 if $interface->extendedAttributes->{IsImmutablePrototypeExoticObjectOnPrototype};
+
</ins><span class="cx"> # structure flags
</span><span class="cx"> if (%structureFlags) {
</span><span class="cx"> push(@$outputArray, "public:\n");
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -74,6 +74,8 @@
</span><span class="cx"> ImplementationReturnType=*
</span><span class="cx"> ImplicitThis
</span><span class="cx"> InterfaceName=*
</span><ins>+IsImmutablePrototypeExoticObject
+IsImmutablePrototypeExoticObjectOnPrototype
</ins><span class="cx"> IsWeakCallback
</span><span class="cx"> JSBuiltin
</span><span class="cx"> JSBuiltinConstructor
</span></span></pre></div>
<a id="trunkSourceWebCoredomEventTargetidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/EventTarget.idl (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/EventTarget.idl        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/WebCore/dom/EventTarget.idl        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> [
</span><span class="cx"> CustomToJSObject,
</span><span class="cx"> Exposed=(Window,Worker),
</span><ins>+ IsImmutablePrototypeExoticObjectOnPrototype,
</ins><span class="cx"> JSCustomHeader,
</span><span class="cx"> JSCustomToNativeObject,
</span><span class="cx"> ] interface EventTarget {
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (209423 => 209424)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2016-12-06 22:38:45 UTC (rev 209423)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2016-12-06 22:43:16 UTC (rev 209424)
</span><span class="lines">@@ -36,6 +36,8 @@
</span><span class="cx"> ExportMacro=WEBCORE_EXPORT,
</span><span class="cx"> ImplicitThis,
</span><span class="cx"> InterfaceName=Window,
</span><ins>+ IsImmutablePrototypeExoticObject,
+ IsImmutablePrototypeExoticObjectOnPrototype,
</ins><span class="cx"> JSCustomDefineOwnProperty,
</span><span class="cx"> JSCustomMarkFunction,
</span><span class="cx"> JSCustomToNativeObject,
</span></span></pre>
</div>
</div>
</body>
</html>