<!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>[205372] 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/205372">205372</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-09-02 14:41:58 -0700 (Fri, 02 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, roll out <a href="http://trac.webkit.org/projects/webkit/changeset/205354">r205354</a> because it caused JSC test failures

Source/JavaScriptCore:

* jsc.cpp:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::allowsAccessFrom):
(JSC::JSGlobalObject::setDebugger): Deleted.
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor):
(JSC::GlobalFuncProtoGetterFunctor::result):
(JSC::GlobalFuncProtoGetterFunctor::operator()):
(JSC::globalFuncProtoGetter):
(JSC::GlobalFuncProtoSetterFunctor::GlobalFuncProtoSetterFunctor):
(JSC::GlobalFuncProtoSetterFunctor::allowsAccess):
(JSC::GlobalFuncProtoSetterFunctor::operator()):
(JSC::checkProtoSetterAccessAllowed):
(JSC::globalFuncProtoSetter):
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::allowsAccessFrom):
* runtime/JSObject.h:
* runtime/JSProxy.cpp:
* runtime/JSProxy.h:
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor):
(JSC::ObjectConstructorGetPrototypeOfFunctor::result):
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorSetPrototypeOf):
* runtime/ObjectConstructor.h:
* runtime/ReflectObject.cpp:
(JSC::reflectObjectGetPrototypeOf):
(JSC::reflectObjectSetPrototypeOf):

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::shouldAllowAccessFrom):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::preventExtensions): Deleted.
(WebCore::JSDOMWindow::setLocation): Deleted.
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::preventExtensions): Deleted.
(WebCore::JSLocationPrototype::putDelegate): Deleted.
(WebCore::JSLocationPrototype::defineOwnProperty): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
* bindings/js/JSWorkerGlobalScopeBase.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:
* page/Location.idl:

LayoutTests:

* fast/dom/Window/script-tests/window-custom-prototype.js: Added.
* fast/dom/Window/window-custom-prototype-crash-expected.txt:
* fast/dom/Window/window-custom-prototype-expected.txt: Added.
* fast/dom/Window/window-custom-prototype.html: Added.
* http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt:
* http/tests/security/cross-frame-access-object-getPrototypeOf.html:
* http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt:
* http/tests/security/cross-frame-access-object-setPrototypeOf.html:
* http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto.html:
* http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-method-with-iframe-proto.html:
* http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto.html:
* http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html:
* js/dom/setPrototypeOf-location-window-expected.txt: Removed.
* js/dom/setPrototypeOf-location-window.html: Removed.
* js/object-literal-shorthand-construction-expected.txt:
* js/script-tests/object-literal-shorthand-construction.js:
* js/script-tests/sloppy-getter-setter-global-object.js:
* js/sloppy-getter-setter-global-object-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowcustomprototypecrashexpectedtxt">trunk/LayoutTests/fast/dom/Window/window-custom-prototype-crash-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccessobjectgetPrototypeOfexpectedtxt">trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccessobjectgetPrototypeOfhtml">trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccessobjectsetPrototypeOfexpectedtxt">trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccessobjectsetPrototypeOfhtml">trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDhtmlelelmentwithiframeprotoexpectedtxt">trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDhtmlelelmentwithiframeprotohtml">trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDmethodwithiframeprotoexpectedtxt">trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDmethodwithiframeprotohtml">trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDnonshadowableproptertywithiframeprotoexpectedtxt">trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDnonshadowableproptertywithiframeprotohtml">trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDregularproptertywithiframeprotoexpectedtxt">trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDregularproptertywithiframeprotohtml">trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html</a></li>
<li><a href="#trunkLayoutTestsjsobjectliteralshorthandconstructionexpectedtxt">trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsobjectliteralshorthandconstructionjs">trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js</a></li>
<li><a href="#trunkLayoutTestsjsscripttestssloppygettersetterglobalobjectjs">trunk/LayoutTests/js/script-tests/sloppy-getter-setter-global-object.js</a></li>
<li><a href="#trunkLayoutTestsjssloppygettersetterglobalobjectexpectedtxt">trunk/LayoutTests/js/sloppy-getter-setter-global-object-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorejsccpp">trunk/Source/JavaScriptCore/jsc.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjecth">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionscpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionsh">trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjecth">trunk/Source/JavaScriptCore/runtime/JSObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSProxycpp">trunk/Source/JavaScriptCore/runtime/JSProxy.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSProxyh">trunk/Source/JavaScriptCore/runtime/JSProxy.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectConstructorcpp">trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectConstructorh">trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeReflectObjectcpp">trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowBasecpp">trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSLocationCustomcpp">trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBasecpp">trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBaseh">trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.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="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
<li><a href="#trunkSourceWebCorepageLocationidl">trunk/Source/WebCore/page/Location.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomWindowscripttestswindowcustomprototypejs">trunk/LayoutTests/fast/dom/Window/script-tests/window-custom-prototype.js</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowcustomprototypeexpectedtxt">trunk/LayoutTests/fast/dom/Window/window-custom-prototype-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowcustomprototypehtml">trunk/LayoutTests/fast/dom/Window/window-custom-prototype.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsdomsetPrototypeOflocationwindowexpectedtxt">trunk/LayoutTests/js/dom/setPrototypeOf-location-window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomsetPrototypeOflocationwindowhtml">trunk/LayoutTests/js/dom/setPrototypeOf-location-window.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/ChangeLog        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-09-02  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Unreviewed, roll out r205354 because it caused JSC test failures
+
+        * fast/dom/Window/script-tests/window-custom-prototype.js: Added.
+        * fast/dom/Window/window-custom-prototype-crash-expected.txt:
+        * fast/dom/Window/window-custom-prototype-expected.txt: Added.
+        * fast/dom/Window/window-custom-prototype.html: Added.
+        * http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt:
+        * http/tests/security/cross-frame-access-object-getPrototypeOf.html:
+        * http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt:
+        * http/tests/security/cross-frame-access-object-setPrototypeOf.html:
+        * http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt:
+        * http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto.html:
+        * http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
+        * http/tests/security/xss-DENIED-method-with-iframe-proto.html:
+        * http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt:
+        * http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto.html:
+        * http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt:
+        * http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html:
+        * js/dom/setPrototypeOf-location-window-expected.txt: Removed.
+        * js/dom/setPrototypeOf-location-window.html: Removed.
+        * js/object-literal-shorthand-construction-expected.txt:
+        * js/script-tests/object-literal-shorthand-construction.js:
+        * js/script-tests/sloppy-getter-setter-global-object.js:
+        * js/sloppy-getter-setter-global-object-expected.txt:
+
</ins><span class="cx"> 2016-09-02  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rebaseline fast/mediastream/MediaStreamTrack-getSettings.html after r205348.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowscripttestswindowcustomprototypejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Window/script-tests/window-custom-prototype.js (0 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/script-tests/window-custom-prototype.js                                (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/script-tests/window-custom-prototype.js        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+description(&quot;Test what happens when you set the window's prototype to various values.&quot;);
+
+var originalWindowPrototype = __proto__;
+var chainPointingBackToWindow = { __proto__: window };
+var anotherObject = { };
+
+shouldThrow(&quot;__proto__ = window; __proto&quot;, &quot;'TypeError: cyclic __proto__ value'&quot;);
+shouldThrow(&quot;__proto__ = chainPointingBackToWindow; __proto__&quot;, &quot;'TypeError: cyclic __proto__ value'&quot;);
+shouldBe(&quot;__proto__ = 1; __proto__&quot;, &quot;originalWindowPrototype&quot;);
+shouldBe(&quot;__proto__ = 'a string'; __proto__&quot;, &quot;originalWindowPrototype&quot;);
+shouldBe(&quot;__proto__ = anotherObject; __proto__&quot;, &quot;anotherObject&quot;);
+shouldThrow(&quot;anotherObject.__proto__ = window; __proto__&quot;, &quot;'TypeError: cyclic __proto__ value'&quot;);
+shouldBe(&quot;__proto__ = 1; __proto__&quot;, &quot;anotherObject&quot;);
+shouldBe(&quot;__proto__ = 'a string'; __proto__&quot;, &quot;anotherObject&quot;);
+shouldBe(&quot;__proto__ = anotherObject; __proto__&quot;, &quot;anotherObject&quot;);
+shouldBe(&quot;__proto__ = originalWindowPrototype; __proto__&quot;, &quot;originalWindowPrototype&quot;);
+shouldBe(&quot;anotherObject.__proto__ = window; anotherObject.__proto__&quot;, &quot;window&quot;);
+shouldBe(&quot;__proto__ = null; __proto__&quot;, &quot;null&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowcustomprototypecrashexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/window-custom-prototype-crash-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-custom-prototype-crash-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/fast/dom/Window/window-custom-prototype-crash-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,2 +1 @@
</span><del>-CONSOLE MESSAGE: line 7: TypeError: Cannot set prototype of this object
</del><span class="cx"> If this did not crash the test has succeeded.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowcustomprototypeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Window/window-custom-prototype-expected.txt (0 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-custom-prototype-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/window-custom-prototype-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Test what happens when you set the window's prototype to various values.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS __proto__ = window; __proto threw exception TypeError: cyclic __proto__ value.
+PASS __proto__ = chainPointingBackToWindow; __proto__ threw exception TypeError: cyclic __proto__ value.
+PASS __proto__ = 1; __proto__ is originalWindowPrototype
+PASS __proto__ = 'a string'; __proto__ is originalWindowPrototype
+PASS __proto__ = anotherObject; __proto__ is anotherObject
+PASS anotherObject.__proto__ = window; __proto__ threw exception TypeError: cyclic __proto__ value.
+PASS __proto__ = 1; __proto__ is anotherObject
+PASS __proto__ = 'a string'; __proto__ is anotherObject
+PASS __proto__ = anotherObject; __proto__ is anotherObject
+PASS __proto__ = originalWindowPrototype; __proto__ is originalWindowPrototype
+PASS anotherObject.__proto__ = window; anotherObject.__proto__ is window
+PASS __proto__ = null; __proto__ is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowcustomprototypehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Window/window-custom-prototype.html (0 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-custom-prototype.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/window-custom-prototype.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;script-tests/window-custom-prototype.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossframeaccessobjectgetPrototypeOfexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,9 +1,9 @@
</span><ins>+CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
+CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</ins><span class="cx"> This tests that you can't get the prototype of the window or history objects cross-origin using Object.getPrototypeOf().
</span><span class="cx"> 
</span><span class="cx"> PASS: Object.getPrototypeOf(targetWindow) should be 'null' and is.
</span><span class="cx"> PASS: Object.getPrototypeOf(targetWindow.location) should be 'null' and is.
</span><del>-PASS: protoGetter.call(targetWindow) should be 'null' and is.
-PASS: protoGetter.call(targetWindow.location) should be 'null' and is.
</del><span class="cx"> PASS targetWindow.history threw exception SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match..
</span><span class="cx"> PASS: successfullyParsed should be 'true' and is.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossframeaccessobjectgetPrototypeOfhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-getPrototypeOf.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -18,10 +18,6 @@
</span><span class="cx"> 
</span><span class="cx">             shouldBeNull(&quot;Object.getPrototypeOf(targetWindow)&quot;);
</span><span class="cx">             shouldBeNull(&quot;Object.getPrototypeOf(targetWindow.location)&quot;);
</span><del>-            protoGetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').get;
-            shouldBeNull(&quot;protoGetter.call(targetWindow)&quot;);
-            shouldBeNull(&quot;protoGetter.call(targetWindow.location)&quot;);
-
</del><span class="cx">             shouldThrowErrorName(&quot;targetWindow.history&quot;, &quot;SecurityError&quot;);
</span><span class="cx"> 
</span><span class="cx">             finishJSTest();
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossframeaccessobjectsetPrototypeOfexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,3 +1,5 @@
</span><ins>+CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
+CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</ins><span class="cx"> This tests that you can't set the prototype of the window or location objects cross-origin using Object.setPrototypeOf()
</span><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="lines">@@ -4,17 +6,11 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS: targetWindow instanceof Array should be 'false' and is.
</span><del>-PASS Object.setPrototypeOf(targetWindow, Array.prototype) threw exception TypeError: Cannot set prototype of this object.
</del><ins>+PASS Object.setPrototypeOf(targetWindow, Array.prototype) threw exception TypeError: Permission denied.
</ins><span class="cx"> PASS: targetWindow instanceof Array should be 'false' and is.
</span><span class="cx"> PASS: targetWindow.location instanceof Array should be 'false' and is.
</span><del>-PASS Object.setPrototypeOf(targetWindow.location, Array.prototype) threw exception TypeError: Cannot set prototype of this object.
</del><ins>+PASS Object.setPrototypeOf(targetWindow.location, Array.prototype) threw exception TypeError: Permission denied.
</ins><span class="cx"> PASS: targetWindow.location instanceof Array should be 'false' and is.
</span><del>-PASS: targetWindow instanceof Array should be 'false' and is.
-PASS protoSetter.call(targetWindow, Array.prototype) threw exception TypeError: Cannot set prototype of this object.
-PASS: targetWindow instanceof Array should be 'false' and is.
-PASS: targetWindow.location instanceof Array should be 'false' and is.
-PASS protoSetter.call(targetWindow.location, Array.prototype) threw exception TypeError: Cannot set prototype of this object.
-PASS: targetWindow.location instanceof Array should be 'false' and is.
</del><span class="cx"> PASS: successfullyParsed should be 'true' and is.
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossframeaccessobjectsetPrototypeOfhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-object-setPrototypeOf.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -24,15 +24,6 @@
</span><span class="cx">             shouldThrowErrorName(&quot;Object.setPrototypeOf(targetWindow.location, Array.prototype)&quot;, &quot;TypeError&quot;);
</span><span class="cx">             shouldBeFalse(&quot;targetWindow.location instanceof Array&quot;);
</span><span class="cx"> 
</span><del>-            protoSetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
-            shouldBeFalse(&quot;targetWindow instanceof Array&quot;);
-            shouldThrowErrorName(&quot;protoSetter.call(targetWindow, Array.prototype)&quot;, &quot;TypeError&quot;);
-            shouldBeFalse(&quot;targetWindow instanceof Array&quot;);
-
-            shouldBeFalse(&quot;targetWindow.location instanceof Array&quot;);
-            shouldThrowErrorName(&quot;protoSetter.call(targetWindow.location, Array.prototype)&quot;, &quot;TypeError&quot;);
-            shouldBeFalse(&quot;targetWindow.location instanceof Array&quot;);
-
</del><span class="cx">             finishJSTest();
</span><span class="cx">         }
</span><span class="cx">     &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDhtmlelelmentwithiframeprotoexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -4,7 +4,6 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS __proto__ = targetWindow threw exception TypeError: Cannot set prototype of this object.
</del><span class="cx"> PASS targetWindow.myinput threw exception SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match..
</span><span class="cx"> PASS: successfullyParsed should be 'true' and is.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDhtmlelelmentwithiframeprotohtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto.html (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto.html        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> targetWindow = frames[0];
</span><span class="cx"> 
</span><span class="cx"> window.onload = function() {
</span><del>-  shouldThrowErrorName(&quot;__proto__ = targetWindow&quot;, &quot;TypeError&quot;);
</del><ins>+  __proto__ = targetWindow;
</ins><span class="cx">   shouldThrowErrorName('targetWindow.myinput', 'SecurityError');
</span><span class="cx">   finishJSTest();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDmethodwithiframeprotoexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,14 +1,6 @@
</span><del>-CONSOLE MESSAGE: line 36: SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 43: SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 50: SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</del><ins>+CONSOLE MESSAGE: line 40: SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
+CONSOLE MESSAGE: line 47: SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
+CONSOLE MESSAGE: line 54: SecurityError (DOM Exception 18): Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</ins><span class="cx"> 
</span><span class="cx"> Tests that making other frame window a prototype doesn't expose that window methods
</span><span class="cx"> 
</span><del>-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS __proto__ = targetWindow threw exception TypeError: Cannot set prototype of this object.
-PASS: successfullyParsed should be 'true' and is.
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDmethodwithiframeprotohtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto.html (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto.html        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;/js-test-resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> &lt;script src=&quot;resources/cross-frame-access.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -7,9 +6,13 @@
</span><span class="cx"> &lt;iframe src=&quot;http://localhost:8000/&quot; style=&quot;&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-description(&quot;Tests that making other frame window a prototype doesn't expose that window methods&quot;);
-jsTestIsAsync = true;
</del><ins>+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
</ins><span class="cx"> 
</span><ins>+log(&quot;Tests that making other frame window a prototype doesn't expose that window methods&quot;);
+
</ins><span class="cx"> targetWindow = frames[0];
</span><span class="cx"> 
</span><span class="cx"> wasInvoked = false;
</span><span class="lines">@@ -20,13 +23,14 @@
</span><span class="cx"> 
</span><span class="cx"> function check() {
</span><span class="cx">   shouldBeFalse('this.wasInvoked');
</span><del>-  finishJSTest();
</del><ins>+  if (window.testRunner)
+      testRunner.notifyDone();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> window.onload = function() {
</span><span class="cx">   originalSetTimeout = setTimeout;
</span><span class="cx"> 
</span><del>-  shouldThrowErrorName(&quot;__proto__ = targetWindow&quot;, &quot;TypeError&quot;);
</del><ins>+  __proto__ = targetWindow;
</ins><span class="cx"> 
</span><span class="cx">   var needsCheck = false;
</span><span class="cx">   try {
</span><span class="lines">@@ -53,10 +57,10 @@
</span><span class="cx">   if (needsCheck) {
</span><span class="cx">     originalSetTimeout(check, 10);
</span><span class="cx">   } else {
</span><del>-    finishJSTest();
</del><ins>+    if (window.testRunner)
+      testRunner.notifyDone();
</ins><span class="cx">   }
</span><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;/js-test-resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDnonshadowableproptertywithiframeprotoexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,13 +1,5 @@
</span><span class="cx"> 
</span><span class="cx"> Tests that making other frame window a prototype doesn't expose that window properties
</span><del>-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS __proto__ = targetWindow threw exception TypeError: Cannot set prototype of this object.
</del><span class="cx"> PASS: location === originalLocation should be 'true' and is.
</span><span class="cx"> PASS: this.location === originalLocation should be 'true' and is.
</span><del>-PASS: successfullyParsed should be 'true' and is.
</del><span class="cx"> 
</span><del>-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDnonshadowableproptertywithiframeprotohtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto.html (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto.html        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;/js-test-resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> &lt;script src=&quot;resources/cross-frame-access.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -7,21 +6,21 @@
</span><span class="cx"> &lt;iframe src=&quot;http://localhost:8000/&quot; style=&quot;&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-description(&quot;Tests that making other frame window a prototype doesn't expose that window properties&quot;);
-jsTestIsAsync = true;
</del><ins>+if (window.testRunner)
+    testRunner.dumpAsText();
</ins><span class="cx"> 
</span><ins>+log(&quot;Tests that making other frame window a prototype doesn't expose that window properties&quot;);
+
</ins><span class="cx"> targetWindow = frames[0];
</span><span class="cx"> 
</span><span class="cx"> window.onload = function() {
</span><span class="cx">   originalLocation = location;
</span><span class="cx"> 
</span><del>-  shouldThrowErrorName(&quot;__proto__ = targetWindow&quot;, &quot;TypeError&quot;);
</del><ins>+  __proto__ = targetWindow;
</ins><span class="cx"> 
</span><span class="cx">   shouldBeTrue('location === originalLocation');
</span><span class="cx">   shouldBeTrue('this.location === originalLocation');
</span><del>-  finishJSTest();
</del><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;/js-test-resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDregularproptertywithiframeprotoexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,13 +1,5 @@
</span><span class="cx"> 
</span><span class="cx"> Tests that making other frame window a prototype doesn't expose that window properties
</span><del>-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS __proto__ = targetWindow threw exception TypeError: Cannot set prototype of this object.
</del><span class="cx"> PASS: innerHeight === originalInnerHeight should be 'true' and is.
</span><span class="cx"> PASS: this.innerHeight === originalInnerHeight should be 'true' and is.
</span><del>-PASS: successfullyParsed should be 'true' and is.
</del><span class="cx"> 
</span><del>-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDregularproptertywithiframeprotohtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;/js-test-resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> &lt;script src=&quot;resources/cross-frame-access.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="lines">@@ -7,21 +6,21 @@
</span><span class="cx"> &lt;iframe src=&quot;http://localhost:8000/&quot; style=&quot;&quot;&gt;&lt;/iframe&gt;
</span><span class="cx"> &lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-description(&quot;Tests that making other frame window a prototype doesn't expose that window properties&quot;);
-jsTestIsAsync = true;
</del><ins>+if (window.testRunner)
+    testRunner.dumpAsText();
</ins><span class="cx"> 
</span><ins>+log(&quot;Tests that making other frame window a prototype doesn't expose that window properties&quot;);
+
</ins><span class="cx"> targetWindow = frames[0];
</span><span class="cx"> 
</span><span class="cx"> window.onload = function() {
</span><span class="cx">   originalInnerHeight = innerHeight;
</span><span class="cx"> 
</span><del>-  shouldThrowErrorName(&quot;__proto__ = targetWindow&quot;, &quot;TypeError&quot;);
</del><ins>+  __proto__ = targetWindow;
</ins><span class="cx"> 
</span><span class="cx">   shouldBeTrue('innerHeight === originalInnerHeight');
</span><span class="cx">   shouldBeTrue('this.innerHeight === originalInnerHeight');
</span><del>-  finishJSTest();
</del><span class="cx"> }
</span><span class="cx"> &lt;/script&gt;
</span><del>-&lt;script src=&quot;/js-test-resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</del><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomsetPrototypeOflocationwindowexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/setPrototypeOf-location-window-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/setPrototypeOf-location-window-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/js/dom/setPrototypeOf-location-window-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,21 +0,0 @@
</span><del>-Test that it is not possible to set the prototype of Window or Location.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-PASS Object.getPrototypeOf(window) is Window.prototype
-PASS Object.setPrototypeOf(window, Node.prototype) threw exception TypeError: Cannot set prototype of this object.
-PASS Object.getPrototypeOf(window) is Window.prototype
-PASS Object.getPrototypeOf(window) is Window.prototype
-PASS protoSetter.call(window, Node.prototype) threw exception TypeError: Cannot set prototype of this object.
-PASS Object.getPrototypeOf(window) is Window.prototype
-PASS Object.getPrototypeOf(window.location) is Location.prototype
-PASS Object.setPrototypeOf(window.location, Node.prototype) threw exception TypeError: Cannot set prototype of this object.
-PASS Object.getPrototypeOf(window.location) is Location.prototype
-PASS Object.getPrototypeOf(window.location) is Location.prototype
-PASS protoSetter.call(window.location, Node.prototype) threw exception TypeError: Cannot set prototype of this object.
-PASS Object.getPrototypeOf(window.location) is Location.prototype
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsjsdomsetPrototypeOflocationwindowhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/setPrototypeOf-location-window.html (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/setPrototypeOf-location-window.html        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/js/dom/setPrototypeOf-location-window.html        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;body&gt;
-&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;script&gt;
-description(&quot;Test that it is not possible to set the prototype of Window or Location.&quot;);
-
-var protoSetter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
-
-shouldBe(&quot;Object.getPrototypeOf(window)&quot;, &quot;Window.prototype&quot;);
-shouldThrowErrorName(&quot;Object.setPrototypeOf(window, Node.prototype)&quot;, &quot;TypeError&quot;);
-shouldBe(&quot;Object.getPrototypeOf(window)&quot;, &quot;Window.prototype&quot;);
-
-shouldBe(&quot;Object.getPrototypeOf(window)&quot;, &quot;Window.prototype&quot;);
-shouldThrowErrorName(&quot;protoSetter.call(window, Node.prototype)&quot;, &quot;TypeError&quot;);
-shouldBe(&quot;Object.getPrototypeOf(window)&quot;, &quot;Window.prototype&quot;);
-
-shouldBe(&quot;Object.getPrototypeOf(window.location)&quot;, &quot;Location.prototype&quot;);
-shouldThrowErrorName(&quot;Object.setPrototypeOf(window.location, Node.prototype)&quot;, &quot;TypeError&quot;);
-shouldBe(&quot;Object.getPrototypeOf(window.location)&quot;, &quot;Location.prototype&quot;);
-
-shouldBe(&quot;Object.getPrototypeOf(window.location)&quot;, &quot;Location.prototype&quot;);
-shouldThrowErrorName(&quot;protoSetter.call(window.location, Node.prototype)&quot;, &quot;TypeError&quot;);
-shouldBe(&quot;Object.getPrototypeOf(window.location)&quot;, &quot;Location.prototype&quot;);
-&lt;/script&gt;
-&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
-&lt;/script&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsjsobjectliteralshorthandconstructionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -61,7 +61,9 @@
</span><span class="cx"> PASS !!Object.getOwnPropertyDescriptor({set x(value){}}, 'x').set is true
</span><span class="cx"> PASS !!Object.getOwnPropertyDescriptor({set 'x'(value){}}, 'x').set is true
</span><span class="cx"> PASS !!Object.getOwnPropertyDescriptor({set 42(value){}}, '42').set is true
</span><del>-PASS __proto__ = [] threw exception TypeError: Cannot set prototype of this object.
</del><ins>+PASS __proto__ = []; ({__proto__: __proto__}) instanceof Array is true
+PASS __proto__ = []; ({__proto__}) instanceof Array is false
+PASS __proto__ = []; ({__proto__}).__proto__ instanceof Array is true
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsobjectliteralshorthandconstructionjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -109,4 +109,7 @@
</span><span class="cx"> shouldBeTrue(&quot;!!Object.getOwnPropertyDescriptor({set 'x'(value){}}, 'x').set&quot;);
</span><span class="cx"> shouldBeTrue(&quot;!!Object.getOwnPropertyDescriptor({set 42(value){}}, '42').set&quot;);
</span><span class="cx"> 
</span><del>-shouldThrowErrorName(&quot;__proto__ = []&quot;, &quot;TypeError&quot;);
</del><ins>+// __proto__ shorthand should be not modify the prototype.
+shouldBeTrue(&quot;__proto__ = []; ({__proto__: __proto__}) instanceof Array&quot;);
+shouldBeFalse(&quot;__proto__ = []; ({__proto__}) instanceof Array&quot;);
+shouldBeTrue(&quot;__proto__ = []; ({__proto__}).__proto__ instanceof Array&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestssloppygettersetterglobalobjectjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/sloppy-getter-setter-global-object.js (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/sloppy-getter-setter-global-object.js        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/js/script-tests/sloppy-getter-setter-global-object.js        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -33,4 +33,4 @@
</span><span class="cx"> shouldNotThrow(&quot;top_level_sloppy_getter();&quot;);
</span><span class="cx"> 
</span><span class="cx"> var top_level_sloppy_setter = Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set;
</span><del>-shouldThrowErrorName(&quot;top_level_sloppy_setter(['foo']);&quot;, &quot;TypeError&quot;);
</del><ins>+shouldNotThrow(&quot;top_level_sloppy_setter(['foo']);&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjssloppygettersetterglobalobjectexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/sloppy-getter-setter-global-object-expected.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/sloppy-getter-setter-global-object-expected.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/LayoutTests/js/sloppy-getter-setter-global-object-expected.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> PASS (0,Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').get)() threw exception TypeError: Can't convert undefined or null to object.
</span><span class="cx"> PASS (0,Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set)(['foo']) threw exception TypeError: Can't convert undefined or null to object.
</span><span class="cx"> PASS top_level_sloppy_getter(); did not throw exception.
</span><del>-PASS top_level_sloppy_setter(['foo']); threw exception TypeError: Cannot set prototype of this object.
</del><ins>+PASS top_level_sloppy_setter(['foo']); did not throw exception.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2016-09-02  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Unreviewed, roll out r205354 because it caused JSC test failures
+
+        * jsc.cpp:
+        * runtime/JSGlobalObject.cpp:
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::allowsAccessFrom):
+        (JSC::JSGlobalObject::setDebugger): Deleted.
+        * runtime/JSGlobalObjectFunctions.cpp:
+        (JSC::GlobalFuncProtoGetterFunctor::GlobalFuncProtoGetterFunctor):
+        (JSC::GlobalFuncProtoGetterFunctor::result):
+        (JSC::GlobalFuncProtoGetterFunctor::operator()):
+        (JSC::globalFuncProtoGetter):
+        (JSC::GlobalFuncProtoSetterFunctor::GlobalFuncProtoSetterFunctor):
+        (JSC::GlobalFuncProtoSetterFunctor::allowsAccess):
+        (JSC::GlobalFuncProtoSetterFunctor::operator()):
+        (JSC::checkProtoSetterAccessAllowed):
+        (JSC::globalFuncProtoSetter):
+        * runtime/JSGlobalObjectFunctions.h:
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::setPrototypeWithCycleCheck):
+        (JSC::JSObject::allowsAccessFrom):
+        * runtime/JSObject.h:
+        * runtime/JSProxy.cpp:
+        * runtime/JSProxy.h:
+        * runtime/ObjectConstructor.cpp:
+        (JSC::ObjectConstructorGetPrototypeOfFunctor::ObjectConstructorGetPrototypeOfFunctor):
+        (JSC::ObjectConstructorGetPrototypeOfFunctor::result):
+        (JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
+        (JSC::objectConstructorGetPrototypeOf):
+        (JSC::objectConstructorSetPrototypeOf):
+        * runtime/ObjectConstructor.h:
+        * runtime/ReflectObject.cpp:
+        (JSC::reflectObjectGetPrototypeOf):
+        (JSC::reflectObjectSetPrototypeOf):
+
</ins><span class="cx"> 2016-09-02  Caio Lima  &lt;ticaiolima@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Register usage optimization in mathIC when LHS and RHS are constants isn't configured correctly
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejsccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jsc.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jsc.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/jsc.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -903,7 +903,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> const ClassInfo GlobalObject::s_info = { &quot;global&quot;, &amp;JSGlobalObject::s_info, nullptr, CREATE_METHOD_TABLE(GlobalObject) };
</span><del>-const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, 0, &amp;shouldInterruptScriptBeforeTimeout, &amp;moduleLoaderResolve, &amp;moduleLoaderFetch, nullptr, nullptr, nullptr, nullptr };
</del><ins>+const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &amp;allowsAccessFrom, &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, 0, &amp;shouldInterruptScriptBeforeTimeout, &amp;moduleLoaderResolve, &amp;moduleLoaderFetch, nullptr, nullptr, nullptr, nullptr };
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> GlobalObject::GlobalObject(VM&amp; vm, Structure* structure)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx"> 
</span><span class="cx"> const ClassInfo JSGlobalObject::s_info = { &quot;GlobalObject&quot;, &amp;Base::s_info, &amp;globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) };
</span><span class="cx"> 
</span><del>-const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, nullptr, &amp;shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
</del><ins>+const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &amp;allowsAccessFrom, &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, nullptr, &amp;shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
</ins><span class="cx"> 
</span><span class="cx"> /* Source for JSGlobalObject.lut.h
</span><span class="cx"> @begin globalObjectTable
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -148,6 +148,9 @@
</span><span class="cx"> typedef Vector&lt;ExecState*, 16&gt; ExecStateStack;
</span><span class="cx"> 
</span><span class="cx"> struct GlobalObjectMethodTable {
</span><ins>+    typedef bool (*AllowsAccessFromFunctionPtr)(const JSGlobalObject*, ExecState*);
+    AllowsAccessFromFunctionPtr allowsAccessFrom;
+
</ins><span class="cx">     typedef bool (*SupportsRichSourceInfoFunctionPtr)(const JSGlobalObject*);
</span><span class="cx">     SupportsRichSourceInfoFunctionPtr supportsRichSourceInfo;
</span><span class="cx"> 
</span><span class="lines">@@ -709,6 +712,7 @@
</span><span class="cx"> 
</span><span class="cx">     const GlobalObjectMethodTable* globalObjectMethodTable() const { return m_globalObjectMethodTable; }
</span><span class="cx"> 
</span><ins>+    static bool allowsAccessFrom(const JSGlobalObject*, ExecState*) { return true; }
</ins><span class="cx">     static bool supportsRichSourceInfo(const JSGlobalObject*) { return true; }
</span><span class="cx"> 
</span><span class="cx">     JS_EXPORT_PRIVATE ExecState* globalExec();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -866,6 +866,38 @@
</span><span class="cx">     return throwVMTypeError(exec, scope, &quot;'arguments', 'callee', and 'caller' cannot be accessed in strict mode.&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+class GlobalFuncProtoGetterFunctor {
+public:
+    GlobalFuncProtoGetterFunctor(ExecState* exec, JSObject* thisObject)
+        : m_exec(exec)
+        , m_hasSkippedFirstFrame(false)
+        , m_thisObject(thisObject)
+        , m_result(JSValue::encode(jsUndefined()))
+    {
+    }
+
+    EncodedJSValue result() { return m_result; }
+
+    StackVisitor::Status operator()(StackVisitor&amp; visitor) const
+    {
+        if (!m_hasSkippedFirstFrame) {
+            m_hasSkippedFirstFrame = true;
+            return StackVisitor::Continue;
+        }
+
+        if (m_thisObject-&gt;allowsAccessFrom(visitor-&gt;callFrame()))
+            m_result = JSValue::encode(m_thisObject-&gt;getPrototype(m_exec-&gt;vm(), m_exec));
+
+        return StackVisitor::Done;
+    }
+
+private:
+    ExecState* m_exec;
+    mutable bool m_hasSkippedFirstFrame;
+    JSObject* m_thisObject;
+    mutable EncodedJSValue m_result;
+};
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL globalFuncProtoGetter(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="lines">@@ -883,9 +915,49 @@
</span><span class="cx">         return JSValue::encode(prototype);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return JSValue::encode(thisObject-&gt;getPrototype(vm, exec));
</del><ins>+    GlobalFuncProtoGetterFunctor functor(exec, thisObject);
+    // This can throw but it's just unneeded extra work to check for it. The return
+    // value from this function is only used as the return value from a host call.
+    // Therefore, the return value is only used if there wasn't an exception.
+    exec-&gt;iterate(functor);
+    return functor.result();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+class GlobalFuncProtoSetterFunctor {
+public:
+    GlobalFuncProtoSetterFunctor(JSObject* thisObject)
+        : m_hasSkippedFirstFrame(false)
+        , m_allowsAccess(false)
+        , m_thisObject(thisObject)
+    {
+    }
+
+    bool allowsAccess() const { return m_allowsAccess; }
+
+    StackVisitor::Status operator()(StackVisitor&amp; visitor) const
+    {
+        if (!m_hasSkippedFirstFrame) {
+            m_hasSkippedFirstFrame = true;
+            return StackVisitor::Continue;
+        }
+
+        m_allowsAccess = m_thisObject-&gt;allowsAccessFrom(visitor-&gt;callFrame());
+        return StackVisitor::Done;
+    }
+
+private:
+    mutable bool m_hasSkippedFirstFrame;
+    mutable bool m_allowsAccess;
+    JSObject* m_thisObject;
+};
+
+bool checkProtoSetterAccessAllowed(ExecState* exec, JSObject* object)
+{
+    GlobalFuncProtoSetterFunctor functor(object);
+    exec-&gt;iterate(functor);
+    return functor.allowsAccess();
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="lines">@@ -902,6 +974,9 @@
</span><span class="cx">     if (!thisObject)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx"> 
</span><ins>+    if (!checkProtoSetterAccessAllowed(exec, thisObject))
+        return JSValue::encode(jsUndefined());
+
</ins><span class="cx">     // Setting __proto__ to a non-object, non-null value is silently ignored to match Mozilla.
</span><span class="cx">     if (!value.isObject() &amp;&amp; !value.isNull())
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.h        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -52,6 +52,8 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState*);
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL globalFuncBuiltinLog(ExecState*);
</span><span class="cx"> 
</span><ins>+bool checkProtoSetterAccessAllowed(ExecState*, JSObject*);
+
</ins><span class="cx"> static const double mantissaOverflowLowerBound = 9007199254740992.0;
</span><span class="cx"> double parseIntOverflow(const LChar*, unsigned length, int radix);
</span><span class="cx"> bool isStrWhiteSpace(UChar);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1371,6 +1371,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     JSValue nextPrototype = prototype;
</span><ins>+    MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype;
</ins><span class="cx">     while (nextPrototype &amp;&amp; nextPrototype.isObject()) {
</span><span class="cx">         if (nextPrototype == this) {
</span><span class="cx">             if (shouldThrowIfCantSet)
</span><span class="lines">@@ -1377,11 +1378,8 @@
</span><span class="cx">                 throwTypeError(exec, scope, ASCIILiteral(&quot;cyclic __proto__ value&quot;));
</span><span class="cx">             return false;
</span><span class="cx">         }
</span><del>-        // FIXME: The specification says we should do this but this allows for cycles and our
-        // code base currently does not deal properly with such cycles.
-        // https://bugs.webkit.org/show_bug.cgi?id=161534
-        // if (UNLIKELY(asObject(nextPrototype)-&gt;methodTable(vm)-&gt;getPrototype != JSObject::getPrototype))
-        //    break; // We're done. Set the prototype.
</del><ins>+        if (UNLIKELY(asObject(nextPrototype)-&gt;methodTable(vm)-&gt;getPrototype != defaultGetPrototype))
+            break; // We're done. Set the prototype.
</ins><span class="cx">         nextPrototype = asObject(nextPrototype)-&gt;getPrototypeDirect();
</span><span class="cx">     }
</span><span class="cx">     setPrototypeDirect(vm, prototype);
</span><span class="lines">@@ -1403,6 +1401,12 @@
</span><span class="cx">     return methodTable(vm)-&gt;setPrototype(this, exec, prototype, shouldThrowIfCantSet);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool JSObject::allowsAccessFrom(ExecState* exec)
+{
+    JSGlobalObject* globalObject = this-&gt;globalObject();
+    return globalObject-&gt;globalObjectMethodTable()-&gt;allowsAccessFrom(globalObject, exec);
+}
+
</ins><span class="cx"> bool JSObject::putGetter(ExecState* exec, PropertyName propertyName, JSValue getter, unsigned attributes)
</span><span class="cx"> {
</span><span class="cx">     PropertyDescriptor descriptor;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.h (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.h        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.h        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -168,6 +168,8 @@
</span><span class="cx">     // being returned. Once this is fixed we should migrate code &amp; remove this method.
</span><span class="cx">     JS_EXPORT_PRIVATE bool getOwnPropertyDescriptor(ExecState*, PropertyName, PropertyDescriptor&amp;);
</span><span class="cx"> 
</span><ins>+    JS_EXPORT_PRIVATE bool allowsAccessFrom(ExecState*);
+
</ins><span class="cx">     unsigned getArrayLength() const
</span><span class="cx">     {
</span><span class="cx">         if (!hasIndexedProperties(indexingType()))
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSProxy.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSProxy.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSProxy.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -145,16 +145,4 @@
</span><span class="cx">     thisObject-&gt;target()-&gt;methodTable(exec-&gt;vm())-&gt;getOwnPropertyNames(thisObject-&gt;target(), exec, propertyNames, mode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool JSProxy::setPrototype(JSObject* object, ExecState* exec, JSValue value, bool shouldThrowIfCantSet)
-{
-    JSProxy* thisObject = jsCast&lt;JSProxy*&gt;(object);
-    return thisObject-&gt;target()-&gt;methodTable(exec-&gt;vm())-&gt;setPrototype(thisObject-&gt;target(), exec, value, shouldThrowIfCantSet);
-}
-
-JSValue JSProxy::getPrototype(JSObject* object, ExecState* exec)
-{
-    JSProxy* thisObject = jsCast&lt;JSProxy*&gt;(object);
-    return thisObject-&gt;target()-&gt;methodTable(exec-&gt;vm())-&gt;getPrototype(thisObject-&gt;target(), exec);
-}
-
</del><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSProxy.h (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSProxy.h        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/JSProxy.h        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -94,8 +94,6 @@
</span><span class="cx">     JS_EXPORT_PRIVATE static void getStructurePropertyNames(JSObject*, ExecState*, PropertyNameArray&amp;, EnumerationMode);
</span><span class="cx">     JS_EXPORT_PRIVATE static void getGenericPropertyNames(JSObject*, ExecState*, PropertyNameArray&amp;, EnumerationMode);
</span><span class="cx">     JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&amp;, bool shouldThrow);
</span><del>-    JS_EXPORT_PRIVATE static bool setPrototype(JSObject*, ExecState*, JSValue, bool shouldThrowIfCantSet);
-    JS_EXPORT_PRIVATE static JSValue getPrototype(JSObject*, ExecState*);
</del><span class="cx">     JS_EXPORT_PRIVATE static bool preventExtensions(JSObject*, ExecState*);
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -166,12 +166,55 @@
</span><span class="cx">     return CallType::Host;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+class ObjectConstructorGetPrototypeOfFunctor {
+public:
+    ObjectConstructorGetPrototypeOfFunctor(ExecState* exec, JSObject* object)
+        : m_exec(exec)
+        , m_hasSkippedFirstFrame(false)
+        , m_object(object)
+        , m_result(jsUndefined())
+    {
+    }
+
+    JSValue result() const { return m_result; }
+
+    StackVisitor::Status operator()(StackVisitor&amp; visitor) const
+    {
+        if (!m_hasSkippedFirstFrame) {
+            m_hasSkippedFirstFrame = true;
+            return StackVisitor::Continue;
+        }
+
+        if (m_object-&gt;allowsAccessFrom(visitor-&gt;callFrame()))
+            m_result = m_object-&gt;getPrototype(m_exec-&gt;vm(), m_exec);
+        else
+            m_result = jsNull();
+        return StackVisitor::Done;
+    }
+
+private:
+    ExecState* m_exec;
+    mutable bool m_hasSkippedFirstFrame;
+    JSObject* m_object;
+    mutable JSValue m_result;
+};
+
+JSValue objectConstructorGetPrototypeOf(ExecState* exec, JSObject* object)
+{
+    ObjectConstructorGetPrototypeOfFunctor functor(exec, object);
+    // This can throw but it's just unneeded extra work to check for it. The return
+    // value from this function is only used as the return value from a host call.
+    // Therefore, the return value is only used if there wasn't an exception.
+    exec-&gt;iterate(functor);
+    return functor.result();
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorGetPrototypeOf(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     JSObject* object = exec-&gt;argument(0).toObject(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-    return JSValue::encode(object-&gt;getPrototype(exec-&gt;vm(), exec));
</del><ins>+    return JSValue::encode(objectConstructorGetPrototypeOf(exec, object));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorSetPrototypeOf(ExecState* exec)
</span><span class="lines">@@ -191,6 +234,11 @@
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="cx">         return JSValue::encode(objectValue);
</span><span class="cx"> 
</span><ins>+    if (!checkProtoSetterAccessAllowed(exec, object)) {
+        throwTypeError(exec, scope, ASCIILiteral(&quot;Permission denied&quot;));
+        return JSValue::encode(objectValue);
+    }
+
</ins><span class="cx">     bool shouldThrowIfCantSet = true;
</span><span class="cx">     bool didSetPrototype = object-&gt;setPrototype(vm, exec, protoValue, shouldThrowIfCantSet);
</span><span class="cx">     ASSERT_UNUSED(didSetPrototype, vm.exception() || didSetPrototype);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectConstructorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -124,6 +124,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* objectConstructorFreeze(ExecState*, JSObject*);
</span><ins>+JSValue objectConstructorGetPrototypeOf(ExecState*, JSObject*);
</ins><span class="cx"> JSValue objectConstructorGetOwnPropertyDescriptor(ExecState*, JSObject*, const Identifier&amp;);
</span><span class="cx"> JSValue objectConstructorGetOwnPropertyDescriptors(ExecState*, JSObject*);
</span><span class="cx"> JSArray* ownPropertyKeys(ExecState*, JSObject*, PropertyNameMode, DontEnumPropertiesMode);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeReflectObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">     JSValue target = exec-&gt;argument(0);
</span><span class="cx">     if (!target.isObject())
</span><span class="cx">         return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral(&quot;Reflect.getPrototypeOf requires the first argument be an object&quot;)));
</span><del>-    return JSValue::encode(asObject(target)-&gt;getPrototype(exec-&gt;vm(), exec));
</del><ins>+    return JSValue::encode(objectConstructorGetPrototypeOf(exec, asObject(target)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // https://tc39.github.io/ecma262/#sec-reflect.isextensible
</span><span class="lines">@@ -302,6 +302,9 @@
</span><span class="cx"> 
</span><span class="cx">     JSObject* object = asObject(target);
</span><span class="cx"> 
</span><ins>+    if (!checkProtoSetterAccessAllowed(exec, object))
+        return JSValue::encode(jsBoolean(false));
+
</ins><span class="cx">     bool shouldThrowIfCantSet = false;
</span><span class="cx">     bool didSetPrototype = object-&gt;setPrototype(vm, exec, proto, shouldThrowIfCantSet);
</span><span class="cx">     if (vm.exception())
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/ChangeLog        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-09-02  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Unreviewed, roll out r205354 because it caused JSC test failures
+
+        * bindings/js/JSDOMWindowBase.cpp:
+        (WebCore::shouldAllowAccessFrom):
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::JSDOMWindow::preventExtensions): Deleted.
+        (WebCore::JSDOMWindow::setLocation): Deleted.
+        * bindings/js/JSLocationCustom.cpp:
+        (WebCore::JSLocation::preventExtensions): Deleted.
+        (WebCore::JSLocationPrototype::putDelegate): Deleted.
+        (WebCore::JSLocationPrototype::defineOwnProperty): Deleted.
+        * bindings/js/JSWorkerGlobalScopeBase.cpp:
+        (WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
+        * bindings/js/JSWorkerGlobalScopeBase.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        * bindings/scripts/IDLAttributes.txt:
+        * page/DOMWindow.idl:
+        * page/Location.idl:
+
</ins><span class="cx"> 2016-09-02  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Provide a way to open an inspector frontend for a remote target
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -57,9 +57,14 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+static bool shouldAllowAccessFrom(const JSGlobalObject* thisObject, ExecState* exec)
+{
+    return BindingSecurity::shouldAllowAccessToDOMWindow(exec, asJSDOMWindow(thisObject)-&gt;wrapped());
+}
+
</ins><span class="cx"> const ClassInfo JSDOMWindowBase::s_info = { &quot;Window&quot;, &amp;JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) };
</span><span class="cx"> 
</span><del>-const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, &amp;queueTaskToEventLoop, &amp;shouldInterruptScriptBeforeTimeout, &amp;moduleLoaderResolve, &amp;moduleLoaderFetch, nullptr, nullptr, &amp;moduleLoaderEvaluate, &amp;defaultLanguage };
</del><ins>+const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &amp;shouldAllowAccessFrom, &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, &amp;queueTaskToEventLoop, &amp;shouldInterruptScriptBeforeTimeout, &amp;moduleLoaderResolve, &amp;moduleLoaderFetch, nullptr, nullptr, &amp;moduleLoaderEvaluate, &amp;defaultLanguage };
</ins><span class="cx"> 
</span><span class="cx"> JSDOMWindowBase::JSDOMWindowBase(VM&amp; vm, Structure* structure, RefPtr&lt;DOMWindow&gt;&amp;&amp; window, JSDOMWindowShell* shell)
</span><span class="cx">     : JSDOMGlobalObject(vm, structure, shell-&gt;world(), &amp;s_globalObjectMethodTable)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -342,25 +342,6 @@
</span><span class="cx">     return Base::defineOwnProperty(thisObject, exec, propertyName, descriptor, shouldThrow);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool JSDOMWindow::setPrototype(JSObject*, ExecState* exec, JSValue, bool shouldThrowIfCantSet)
-{
-    auto scope = DECLARE_THROW_SCOPE(exec-&gt;vm());
-
-    if (shouldThrowIfCantSet)
-        throwTypeError(exec, scope, ASCIILiteral(&quot;Cannot set prototype of this object&quot;));
-
-    return false;
-}
-
-JSValue JSDOMWindow::getPrototype(JSObject* object, ExecState* exec)
-{
-    JSDOMWindow* thisObject = jsCast&lt;JSDOMWindow*&gt;(object);
-    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, thisObject-&gt;wrapped(), DoNotReportSecurityError))
-        return jsNull();
-
-    return Base::getPrototype(object, exec);
-}
-
</del><span class="cx"> bool JSDOMWindow::preventExtensions(JSObject* object, ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     JSDOMWindow* thisObject = jsCast&lt;JSDOMWindow*&gt;(object);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSLocationCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -128,25 +128,6 @@
</span><span class="cx">     return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool JSLocation::setPrototype(JSObject*, ExecState* exec, JSValue, bool shouldThrowIfCantSet)
-{
-    auto scope = DECLARE_THROW_SCOPE(exec-&gt;vm());
-
-    if (shouldThrowIfCantSet)
-        throwTypeError(exec, scope, ASCIILiteral(&quot;Cannot set prototype of this object&quot;));
-
-    return false;
-}
-
-JSValue JSLocation::getPrototype(JSObject* object, ExecState* exec)
-{
-    JSLocation* thisObject = jsCast&lt;JSLocation*&gt;(object);
-    if (!BindingSecurity::shouldAllowAccessToFrame(exec, thisObject-&gt;wrapped().frame(), DoNotReportSecurityError))
-        return jsNull();
-
-    return Base::getPrototype(object, exec);
-}
-
</del><span class="cx"> bool JSLocation::preventExtensions(JSObject* object, ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     JSLocation* thisObject = jsCast&lt;JSLocation*&gt;(object);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> const ClassInfo JSWorkerGlobalScopeBase::s_info = { &quot;WorkerGlobalScope&quot;, &amp;JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSWorkerGlobalScopeBase) };
</span><span class="cx"> 
</span><del>-const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, &amp;queueTaskToEventLoop, &amp;shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, &amp;defaultLanguage };
</del><ins>+const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &amp;allowsAccessFrom, &amp;supportsRichSourceInfo, &amp;shouldInterruptScript, &amp;javaScriptRuntimeFlags, &amp;queueTaskToEventLoop, &amp;shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, &amp;defaultLanguage };
</ins><span class="cx"> 
</span><span class="cx"> JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase(JSC::VM&amp; vm, JSC::Structure* structure, RefPtr&lt;WorkerGlobalScope&gt;&amp;&amp; impl)
</span><span class="cx">     : JSDOMGlobalObject(vm, structure, normalWorld(vm), &amp;s_globalObjectMethodTable)
</span><span class="lines">@@ -79,6 +79,11 @@
</span><span class="cx">     return m_wrapped.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool JSWorkerGlobalScopeBase::allowsAccessFrom(const JSGlobalObject* object, ExecState* exec)
+{
+    return JSGlobalObject::allowsAccessFrom(object, exec);
+}
+
</ins><span class="cx"> bool JSWorkerGlobalScopeBase::supportsRichSourceInfo(const JSGlobalObject* object)
</span><span class="cx"> {
</span><span class="cx">     return JSGlobalObject::supportsRichSourceInfo(object);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerGlobalScopeBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx"> 
</span><span class="cx">         static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
</span><span class="cx"> 
</span><ins>+        static bool allowsAccessFrom(const JSC::JSGlobalObject*, JSC::ExecState*);
</ins><span class="cx">         static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
</span><span class="cx">         static bool shouldInterruptScript(const JSC::JSGlobalObject*);
</span><span class="cx">         static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -1322,10 +1322,6 @@
</span><span class="cx">     # Custom defineOwnProperty function
</span><span class="cx">     push(@headerContent, &quot;    static bool defineOwnProperty(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, const JSC::PropertyDescriptor&amp;, bool shouldThrow);\n&quot;) if $interface-&gt;extendedAttributes-&gt;{&quot;JSCustomDefineOwnProperty&quot;};
</span><span class="cx"> 
</span><del>-    # Custom getPrototype / setPrototype functions.
-    push (@headerContent, &quot;    static JSC::JSValue getPrototype(JSC::JSObject*, JSC::ExecState*);\n&quot;) if $interface-&gt;extendedAttributes-&gt;{&quot;CustomGetPrototype&quot;};
-    push (@headerContent, &quot;    static bool setPrototype(JSC::JSObject*, JSC::ExecState*, JSC::JSValue, bool shouldThrowIfCantSet);\n&quot;) if $interface-&gt;extendedAttributes-&gt;{&quot;CustomSetPrototype&quot;};
-
</del><span class="cx">     # Custom preventExtensions function.
</span><span class="cx">     push(@headerContent, &quot;    static bool preventExtensions(JSC::JSObject*, JSC::ExecState*);\n&quot;) if $interface-&gt;extendedAttributes-&gt;{&quot;CustomPreventExtensions&quot;};
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> CustomDeleteProperty
</span><span class="cx"> CustomEnumerateProperty
</span><span class="cx"> CustomGetOwnPropertySlot
</span><del>-CustomGetPrototype
</del><span class="cx"> CustomGetter
</span><span class="cx"> CustomIndexedSetter
</span><span class="cx"> CustomIsReachable
</span><span class="lines">@@ -51,7 +50,6 @@
</span><span class="cx"> CustomProxyToJSObject
</span><span class="cx"> CustomPutFunction
</span><span class="cx"> CustomReturn
</span><del>-CustomSetPrototype
</del><span class="cx"> CustomSetter
</span><span class="cx"> CustomToJSObject
</span><span class="cx"> Deletable
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -29,11 +29,9 @@
</span><span class="cx">     CustomDeleteProperty,
</span><span class="cx">     CustomEnumerateProperty,
</span><span class="cx">     CustomGetOwnPropertySlot,
</span><del>-    CustomGetPrototype,
</del><span class="cx">     CustomPreventExtensions,
</span><span class="cx">     CustomProxyToJSObject,
</span><span class="cx">     CustomPutFunction,
</span><del>-    CustomSetPrototype,
</del><span class="cx">     ExportMacro=WEBCORE_EXPORT,
</span><span class="cx">     ImplicitThis,
</span><span class="cx">     InterfaceName=Window,
</span></span></pre></div>
<a id="trunkSourceWebCorepageLocationidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Location.idl (205371 => 205372)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Location.idl        2016-09-02 21:23:43 UTC (rev 205371)
+++ trunk/Source/WebCore/page/Location.idl        2016-09-02 21:41:58 UTC (rev 205372)
</span><span class="lines">@@ -30,10 +30,8 @@
</span><span class="cx">     CheckSecurity,
</span><span class="cx">     CustomDeleteProperty,
</span><span class="cx">     CustomEnumerateProperty,
</span><del>-    CustomGetPrototype,
</del><span class="cx">     CustomNamedSetter,
</span><span class="cx">     CustomPreventExtensions,
</span><del>-    CustomSetPrototype,
</del><span class="cx">     GenerateIsReachable=ImplFrame,
</span><span class="cx">     JSCustomDefineOwnProperty,
</span><span class="cx">     JSCustomDefineOwnPropertyOnPrototype,
</span></span></pre>
</div>
</div>

</body>
</html>