<!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>[196220] 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/196220">196220</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-02-06 10:12:18 -0800 (Sat, 06 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Object.getOwnPropertyDescriptor() does not work on sub-frame's window
https://bugs.webkit.org/show_bug.cgi?id=153925

Reviewed by Darin Adler.

Source/JavaScriptCore:

Calling Object.getOwnPropertyDescriptor() on a sub-frame's window was
returning undefined for that window's own properties. The reason was
that the check getOwnPropertySlot() is using to make sure the
PropertySlot is not for a property coming from the prototype was wrong.

The check was checking that 'this != slotBase' which works fine unless
this is a JSProxy (e.g. JSDOMWindowShell). To handle proxies, the code
was also checking that 'slotBase.toThis() != this', attempting to
get the slotBase/Window's proxy. However, due to the implementation of
toThis(), we were getting the lexical global object's proxy instead of
slotBase's proxy. To avoid this issue, the new code explicitly checks
if 'this' is a JSProxy and makes sure 'JSProxy::target() != slotBase',
instead of using toThis().

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):

LayoutTests:

* fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt: Added.
* fast/dom/Window/getOwnPropertyDescriptor-other-window.html: Added.
Add test case to test calling Object.getOwnPropertyDescriptor() on a
sub-frame's window.

* http/tests/security/cross-origin-window-property-access-expected.txt:
* http/tests/security/cross-origin-window-property-access.html:
- Update test use use an iframe instead of opening a Window for convenience.
- Use an actual cross-origin URL. The previous URL was same-origin and therefore
  the test would have failed if window.location was a proper getter/setter
  instead of a 'value' descriptor.
- Add more tests to cover other Window properties (such as 'name') which are
  actual getter / setters to make sure using the current window's getter on
  a cross origin window does not bypass the security origin checks.

* http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt:
* http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html:
- Drop checks for properties for which cross-origin access via
getOwnPropertyDescriptor() now works. They used to not work because of the bug
this patch fixes, and not due to security checks.
- Most of these properties are part of the properties that the specification
states can be accessed cross-origin:
  https://html.spec.whatwg.org/multipage/browsers.html#security-window
- ALL of these properties could already be accessed cross origin via regular
property getters (e.g. crossOriginWindow.blur) in Safari 9 so there should not
be any reason for getOwnPropertyDescriptor() not to work.
- I have also verified that Firefox allows cross-origin access for all these
  properties (via regular getters or getOwnPropertyDescriptor), except for
  the 'history' property. We may want to align our behavior here and prevent
  cross-origin access to 'window.history' but this is not a regression in this
  patch. You could already access crossOriginWindow.history in Safari 9.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccessgetOwnPropertyDescriptorexpectedtxt">trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccessgetOwnPropertyDescriptorhtml">trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossoriginwindowpropertyaccessexpectedtxt">trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossoriginwindowpropertyaccesshtml">trunk/LayoutTests/http/tests/security/cross-origin-window-property-access.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomWindowgetOwnPropertyDescriptorotherwindowexpectedtxt">trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowgetOwnPropertyDescriptorotherwindowhtml">trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (196219 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-06 17:26:55 UTC (rev 196219)
+++ trunk/LayoutTests/ChangeLog        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2016-02-06  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Object.getOwnPropertyDescriptor() does not work on sub-frame's window
+        https://bugs.webkit.org/show_bug.cgi?id=153925
+
+        Reviewed by Darin Adler.
+
+        * fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt: Added.
+        * fast/dom/Window/getOwnPropertyDescriptor-other-window.html: Added.
+        Add test case to test calling Object.getOwnPropertyDescriptor() on a
+        sub-frame's window.
+
+        * http/tests/security/cross-origin-window-property-access-expected.txt:
+        * http/tests/security/cross-origin-window-property-access.html:
+        - Update test use use an iframe instead of opening a Window for convenience.
+        - Use an actual cross-origin URL. The previous URL was same-origin and therefore
+          the test would have failed if window.location was a proper getter/setter
+          instead of a 'value' descriptor.
+        - Add more tests to cover other Window properties (such as 'name') which are
+          actual getter / setters to make sure using the current window's getter on
+          a cross origin window does not bypass the security origin checks.
+
+        * http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt:
+        * http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html:
+        - Drop checks for properties for which cross-origin access via
+        getOwnPropertyDescriptor() now works. They used to not work because of the bug
+        this patch fixes, and not due to security checks.
+        - Most of these properties are part of the properties that the specification
+        states can be accessed cross-origin:
+          https://html.spec.whatwg.org/multipage/browsers.html#security-window
+        - ALL of these properties could already be accessed cross origin via regular
+        property getters (e.g. crossOriginWindow.blur) in Safari 9 so there should not
+        be any reason for getOwnPropertyDescriptor() not to work.
+        - I have also verified that Firefox allows cross-origin access for all these
+          properties (via regular getters or getOwnPropertyDescriptor), except for
+          the 'history' property. We may want to align our behavior here and prevent
+          cross-origin access to 'window.history' but this is not a regression in this
+          patch. You could already access crossOriginWindow.history in Safari 9.
+
</ins><span class="cx"> 2016-02-06  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Various tests are flaky
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowgetOwnPropertyDescriptorotherwindowexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt (0 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window-expected.txt        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+Tests that calling Object.getOwnPropertyDescriptor() on a sub-frame's window works as expected
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+descriptor = Object.getOwnPropertyDescriptor(otherWindow, 'location')
+PASS descriptor is not undefined
+PASS descriptor.get is an instance of Function
+PASS descriptor.set is an instance of Function
+PASS descriptor.enumerable is true
+PASS descriptor.configurable is false
+PASS descriptor.get.call(otherWindow).toString() is &quot;about:blank&quot;
+FAIL descriptor.get.call().toString() should be about:blank. Threw exception TypeError: The DOMWindow.location getter can only be used on instances of DOMWindow
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowgetOwnPropertyDescriptorotherwindowhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window.html (0 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/getOwnPropertyDescriptor-other-window.html        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&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;iframe id=&quot;testFrame&quot; src=&quot;about:blank&quot;&gt;&lt;/iframe&gt;
+&lt;script&gt;
+description(&quot;Tests that calling Object.getOwnPropertyDescriptor() on a sub-frame's window works as expected&quot;);
+
+otherWindow = frames[0];
+
+evalAndLog(&quot;descriptor = Object.getOwnPropertyDescriptor(otherWindow, 'location')&quot;);
+shouldNotBe(&quot;descriptor&quot;, &quot;undefined&quot;);
+shouldBeType(&quot;descriptor.get&quot;, &quot;Function&quot;);
+shouldBeType(&quot;descriptor.set&quot;, &quot;Function&quot;);
+shouldBeTrue(&quot;descriptor.enumerable&quot;);
+shouldBeFalse(&quot;descriptor.configurable&quot;);
+shouldBeEqualToString(&quot;descriptor.get.call(otherWindow).toString()&quot;, &quot;about:blank&quot;);
+shouldBeEqualToString(&quot;descriptor.get.call().toString()&quot;, &quot;about:blank&quot;);
+&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="trunkLayoutTestshttptestssecuritycrossframeaccessgetOwnPropertyDescriptorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt (196219 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt        2016-02-06 17:26:55 UTC (rev 196219)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor-expected.txt        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -53,6 +53,150 @@
</span><span class="cx"> CONSOLE MESSAGE: line 64: 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"> CONSOLE MESSAGE: line 64: 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"> CONSOLE MESSAGE: line 64: 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><ins>+CONSOLE MESSAGE: line 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 64: 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 test checks cross-frame access security of getOwnPropertyDescriptor (https://bugs.webkit.org/show_bug.cgi?id=32119).
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -188,9 +332,6 @@
</span><span class="cx"> PASS: canGetDescriptor(targetWindow, 'setTimeout') should be 'false' and is.
</span><span class="cx"> PASS: canGetDescriptor(targetWindow, 'showModalDialog') should be 'false' and is.
</span><span class="cx"> PASS: canGetDescriptor(targetWindow, 'stop') should be 'false' and is.
</span><del>-PASS: canGetDescriptor(targetWindow, 'blur') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'close') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'focus') should be 'false' and is.
</del><span class="cx"> 
</span><span class="cx"> ----- tests for getting of not allowed Attributes -----
</span><span class="cx"> 
</span><span class="lines">@@ -257,15 +398,6 @@
</span><span class="cx"> PASS: canGetDescriptor(targetWindow, 'status') should be 'false' and is.
</span><span class="cx"> PASS: canGetDescriptor(targetWindow, 'statusbar') should be 'false' and is.
</span><span class="cx"> PASS: canGetDescriptor(targetWindow, 'toolbar') should be 'false' and is.
</span><del>-PASS: canGetDescriptor(targetWindow, 'closed') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'frames') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'history') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'length') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'opener') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'parent') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'self') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'top') should be 'false' and is.
-PASS: canGetDescriptor(targetWindow, 'window') should be 'false' and is.
</del><span class="cx"> ----- tests access to cross domain location object -----
</span><span class="cx"> PASS: canGetDescriptor(targetLocation, 'protocol') should be 'false' and is.
</span><span class="cx"> PASS: canGetDescriptor(targetLocation, 'host') should be 'false' and is.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossframeaccessgetOwnPropertyDescriptorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html (196219 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html        2016-02-06 17:26:55 UTC (rev 196219)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-getOwnPropertyDescriptor.html        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -129,9 +129,6 @@
</span><span class="cx">             &quot;setTimeout&quot;, 
</span><span class="cx">             &quot;showModalDialog&quot;, 
</span><span class="cx">             &quot;stop&quot;,
</span><del>-            &quot;blur&quot;,
-            &quot;close&quot;,
-            &quot;focus&quot;
</del><span class="cx">         ];
</span><span class="cx"> 
</span><span class="cx">         var windowAttributesPropertiesNotAllowed = [
</span><span class="lines">@@ -197,15 +194,6 @@
</span><span class="cx">             &quot;status&quot;, 
</span><span class="cx">             &quot;statusbar&quot;, 
</span><span class="cx">             &quot;toolbar&quot;,
</span><del>-            &quot;closed&quot;,
-            &quot;frames&quot;,
-            &quot;history&quot;,
-            &quot;length&quot;,
-            &quot;opener&quot;,
-            &quot;parent&quot;,
-            &quot;self&quot;,
-            &quot;top&quot;,
-            &quot;window&quot;
</del><span class="cx">         ];
</span><span class="cx"> 
</span><span class="cx">         window.onload = function()
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossoriginwindowpropertyaccessexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt (196219 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt        2016-02-06 17:26:55 UTC (rev 196219)
+++ trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -1,3 +1,8 @@
</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.
+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.
+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"> Tests that using another window's property getter does not bypass cross-origin checks.
</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,6 +9,11 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(window, &quot;document&quot;).get.call(crossOriginWindow) threw exception TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(window, &quot;document&quot;).get.call').
</span><ins>+PASS Object.getOwnPropertyDescriptor(window, &quot;name&quot;).get.call(crossOriginWindow) returned undefined.
+PASS Object.getOwnPropertyDescriptor(window, &quot;menubar&quot;).get.call(crossOriginWindow) returned undefined.
+PASS Object.getOwnPropertyDescriptor(window, &quot;scrollbars&quot;).get.call(crossOriginWindow) returned undefined.
+PASS Object.getOwnPropertyDescriptor(window, &quot;navigator&quot;).get.call(crossOriginWindow) returned undefined.
+PASS Object.getOwnPropertyDescriptor(window, &quot;screenX&quot;).get.call(crossOriginWindow) returned undefined.
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(window, &quot;location&quot;).get.call(crossOriginWindow) === crossOriginWindow.location is true
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossoriginwindowpropertyaccesshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-origin-window-property-access.html (196219 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-origin-window-property-access.html        2016-02-06 17:26:55 UTC (rev 196219)
+++ trunk/LayoutTests/http/tests/security/cross-origin-window-property-access.html        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -4,21 +4,37 @@
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body onload=&quot;runTest()&quot;&gt;
</span><ins>+&lt;iframe src=&quot;http://localhost:8000/security/resources/blank.html&quot;&gt;&lt;/iframe&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx"> description(&quot;Tests that using another window's property getter does not bypass cross-origin checks.&quot;);
</span><span class="cx"> jsTestIsAsync = true;
</span><del>-if (window.testRunner)
-    testRunner.setCanOpenWindows();
</del><span class="cx"> 
</span><del>-function runTest()
</del><ins>+function shouldThrowOrReturnUndefined(expression)
</ins><span class="cx"> {
</span><del>-    crossOriginWindow = window.open(&quot;http://127.0.0.1:8000/security/resources/blank.html&quot;);
-    crossOriginWindow.onload = function() {
-        shouldThrow('Object.getOwnPropertyDescriptor(window, &quot;document&quot;).get.call(crossOriginWindow)');
-        shouldBeTrue('Object.getOwnPropertyDescriptor(window, &quot;location&quot;).get.call(crossOriginWindow) === crossOriginWindow.location')
-        finishJSTest();
</del><ins>+    try {
+        result = eval(expression);
+    } catch (e) {
+        testPassed(expression + &quot; threw exception &quot; + e + &quot;.&quot;);
+        return;
</ins><span class="cx">     }
</span><ins>+    if (result === undefined)
+        testPassed(expression + &quot; returned undefined.&quot;);
+    else
+        testFailed(expression + &quot; returned &quot; + result);
</ins><span class="cx"> }
</span><ins>+
+function runTest()
+{
+    crossOriginWindow = frames[0];
+    shouldThrowOrReturnUndefined('Object.getOwnPropertyDescriptor(window, &quot;document&quot;).get.call(crossOriginWindow)');
+    shouldThrowOrReturnUndefined('Object.getOwnPropertyDescriptor(window, &quot;name&quot;).get.call(crossOriginWindow)');
+    shouldThrowOrReturnUndefined('Object.getOwnPropertyDescriptor(window, &quot;menubar&quot;).get.call(crossOriginWindow)');
+    shouldThrowOrReturnUndefined('Object.getOwnPropertyDescriptor(window, &quot;scrollbars&quot;).get.call(crossOriginWindow)');
+    shouldThrowOrReturnUndefined('Object.getOwnPropertyDescriptor(window, &quot;navigator&quot;).get.call(crossOriginWindow)');
+    shouldThrowOrReturnUndefined('Object.getOwnPropertyDescriptor(window, &quot;screenX&quot;).get.call(crossOriginWindow)');
+    shouldBeTrue('Object.getOwnPropertyDescriptor(window, &quot;location&quot;).get.call(crossOriginWindow) === crossOriginWindow.location');
+    finishJSTest();
+}
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (196219 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-02-06 17:26:55 UTC (rev 196219)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-02-06  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Object.getOwnPropertyDescriptor() does not work on sub-frame's window
+        https://bugs.webkit.org/show_bug.cgi?id=153925
+
+        Reviewed by Darin Adler.
+
+        Calling Object.getOwnPropertyDescriptor() on a sub-frame's window was
+        returning undefined for that window's own properties. The reason was
+        that the check getOwnPropertySlot() is using to make sure the
+        PropertySlot is not for a property coming from the prototype was wrong.
+
+        The check was checking that 'this != slotBase' which works fine unless
+        this is a JSProxy (e.g. JSDOMWindowShell). To handle proxies, the code
+        was also checking that 'slotBase.toThis() != this', attempting to
+        get the slotBase/Window's proxy. However, due to the implementation of
+        toThis(), we were getting the lexical global object's proxy instead of
+        slotBase's proxy. To avoid this issue, the new code explicitly checks
+        if 'this' is a JSProxy and makes sure 'JSProxy::target() != slotBase',
+        instead of using toThis().
+
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::getOwnPropertyDescriptor):
+
</ins><span class="cx"> 2016-02-06  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] Throw away linked code when navigating to a new page.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (196219 => 196220)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-02-06 17:26:55 UTC (rev 196219)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-02-06 18:12:18 UTC (rev 196220)
</span><span class="lines">@@ -2582,9 +2582,16 @@
</span><span class="cx">     JSC::PropertySlot slot(this);
</span><span class="cx">     if (!methodTable(exec-&gt;vm())-&gt;getOwnPropertySlot(this, exec, propertyName, slot))
</span><span class="cx">         return false;
</span><del>-    /* Workaround, JSDOMWindow::getOwnPropertySlot searches the prototype chain. :-( */
-    if (slot.slotBase() != this &amp;&amp; slot.slotBase() &amp;&amp; slot.slotBase()-&gt;methodTable(exec-&gt;vm())-&gt;toThis(slot.slotBase(), exec, NotStrictMode) != this)
-        return false;
</del><ins>+
+    // JSDOMWindow::getOwnPropertySlot() may return attributes from the prototype chain but getOwnPropertyDescriptor()
+    // should only work for 'own' properties so we exit early if we detect that the property is not an own property.
+    if (slot.slotBase() != this &amp;&amp; slot.slotBase()) {
+        auto* proxy = jsDynamicCast&lt;JSProxy*&gt;(this);
+        // In the case of DOMWindow, |this| may be a JSDOMWindowShell so we also need to check the shell's target Window.
+        if (!proxy || proxy-&gt;target() != slot.slotBase())
+            return false;
+    }
+
</ins><span class="cx">     if (slot.isAccessor())
</span><span class="cx">         descriptor.setAccessorDescriptor(slot.getterSetter(), slot.attributes());
</span><span class="cx">     else if (slot.attributes() &amp; CustomAccessor) {
</span></span></pre>
</div>
</div>

</body>
</html>