<!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>[205096] 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/205096">205096</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-08-27 22:29:05 -0700 (Sat, 27 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Update generated bindings to throw a SecurityError when denying cross-origin access to properties
https://bugs.webkit.org/show_bug.cgi?id=161270
Reviewed by Darin Adler.
Source/WebCore:
Update generated bindings to throw a SecurityError when denying cross-origin
access to properties, as per the HTML specification:
- https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
- https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
Firefox and Chrome already throw but Webkit was logging an error message and
returning undefined instead.
No new tests, updated existing tests.
* bindings/js/JSDOMBinding.cpp:
(WebCore::canAccessDocument):
(WebCore::BindingSecurity::shouldAllowAccessToNode):
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
LayoutTests:
Update / rebaseline existing tests to reflect behavior change.
* http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
* http/tests/security/cross-frame-access-call-expected.txt:
* http/tests/security/cross-frame-access-call.html:
* http/tests/security/cross-origin-window-property-access-expected.txt:
* http/tests/security/location-cross-origin-expected.txt:
* http/tests/security/location-cross-origin.html:
* http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt:
* http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-method-with-iframe-proto.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityaboutBlankxssDENIEDsetopenerexpectedtxt">trunk/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccesscallexpectedtxt">trunk/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossframeaccesscallhtml">trunk/LayoutTests/http/tests/security/cross-frame-access-call.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossoriginwindowpropertyaccessexpectedtxt">trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritylocationcrossoriginexpectedtxt">trunk/LayoutTests/http/tests/security/location-cross-origin-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritylocationcrossoriginhtml">trunk/LayoutTests/http/tests/security/location-cross-origin.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecurityxssDENIEDassignlocationhrefjavascriptexpectedtxt">trunk/LayoutTests/http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt</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="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingcpp">trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingh">trunk/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/ChangeLog        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-08-27 Chris Dumez <cdumez@apple.com>
+
+ Update generated bindings to throw a SecurityError when denying cross-origin access to properties
+ https://bugs.webkit.org/show_bug.cgi?id=161270
+
+ Reviewed by Darin Adler.
+
+ Update / rebaseline existing tests to reflect behavior change.
+
+ * http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
+ * http/tests/security/cross-frame-access-call-expected.txt:
+ * http/tests/security/cross-frame-access-call.html:
+ * http/tests/security/cross-origin-window-property-access-expected.txt:
+ * http/tests/security/location-cross-origin-expected.txt:
+ * http/tests/security/location-cross-origin.html:
+ * http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt:
+ * http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
+ * http/tests/security/xss-DENIED-method-with-iframe-proto.html:
+
</ins><span class="cx"> 2016-08-27 Jonathan Bedard <jbedard@apple.com>
</span><span class="cx">
</span><span class="cx"> WTR needs an implementation of setAutomaticLinkDetectionEnabled
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityaboutBlankxssDENIEDsetopenerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-CONSOLE MESSAGE: line 55: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</del><ins>+CONSOLE MESSAGE: line 55: SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</ins><span class="cx"> CONSOLE MESSAGE: line 2: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</span><span class="cx"> CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating 'target.document.body')
</span><span class="cx"> This page opens a window to "", injects malicious code, and then uses window.open.call to set its opener to the victim. The opened window then tries to scripts its opener.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossframeaccesscallexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-call-expected.txt        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,66 +1,42 @@
</span><del>-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</del><span class="cx"> CONSOLE MESSAGE: line 10: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</span><span class="cx">
</span><ins>+Tests for calling methods of another frame using Function.call
</ins><span class="cx">
</span><del>------ tests for calling methods of another frame using Function.call -----
</del><ins>+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</ins><span class="cx">
</span><del>-PASS: window.setTimeout.call(targetWindow, 'void(0);', 0) should be 'undefined' and is.
-PASS: window.setInterval.call(targetWindow, 'void(0);', 0) should be 'undefined' and is.
-PASS: window.getSelection.call(targetWindow) should be 'undefined' and is.
-PASS: window.find.call(targetWindow, 'string', false, false, false, false, false, false) should be 'undefined' and is.
-PASS: window.confirm.call(targetWindow, 'message') should be 'undefined' and is.
-PASS: window.prompt.call(targetWindow, 'message', 'defaultValue') should be 'undefined' and is.
-PASS: window.getComputedStyle.call(targetWindow, document.body, '') should be 'undefined' and is.
-PASS: window.getMatchedCSSRules.call(targetWindow, document.body, '') should be 'undefined' and is.
-PASS: window.openDatabase.call(targetWindow, 'name', '1.0', 'description', 0) should be 'undefined' and is.
-PASS: window.atob.call(targetWindow, 'string') should be 'undefined' and is.
-PASS: window.btoa.call(targetWindow, 'string') should be 'undefined' and is.
-PASS: window.open.call(targetWindow, '') should be 'undefined' and is.
-PASS: window.addEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is.
-PASS: window.removeEventListener.call(targetWindow, 'load', null, false); should be 'undefined' and is.
-PASS: window.dispatchEvent.call(targetWindow, new Event('click')); should be 'undefined' and is.
-PASS: window.clearTimeout.call(targetWindow, 0); should be 'undefined' and is.
-PASS: window.clearInterval.call(targetWindow, 0); should be 'undefined' and is.
-PASS: window.print.call(targetWindow); should be 'undefined' and is.
-PASS: window.stop.call(targetWindow); should be 'undefined' and is.
-PASS: window.alert.call(targetWindow, 'message'); should be 'undefined' and is.
-PASS: window.scrollBy.call(targetWindow, 0, 0); should be 'undefined' and is.
-PASS: window.scrollTo.call(targetWindow, 0, 0); should be 'undefined' and is.
-PASS: window.scroll.call(targetWindow, 0, 0); should be 'undefined' and is.
-PASS: window.moveBy.call(targetWindow, 0, 0); should be 'undefined' and is.
-PASS: window.moveTo.call(targetWindow, 0, 0); should be 'undefined' and is.
-PASS: window.resizeBy.call(targetWindow, 0, 0); should be 'undefined' and is.
-PASS: window.resizeTo.call(targetWindow, 0, 0); should be 'undefined' and is.
-PASS: window.showModalDialog.call(targetWindow); should be 'undefined' and is.
</del><ins>+
+PASS window.setTimeout.call(targetWindow, 'void(0);', 0) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.setInterval.call(targetWindow, 'void(0);', 0) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.getSelection.call(targetWindow) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.find.call(targetWindow, 'string', false, false, false, false, false, false) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.confirm.call(targetWindow, 'message') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.prompt.call(targetWindow, 'message', 'defaultValue') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.getComputedStyle.call(targetWindow, document.body, '') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.getMatchedCSSRules.call(targetWindow, document.body, '') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.openDatabase.call(targetWindow, 'name', '1.0', 'description', 0) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.atob.call(targetWindow, 'string') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.btoa.call(targetWindow, 'string') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.open.call(targetWindow, '') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.addEventListener.call(targetWindow, 'load', null, false); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.removeEventListener.call(targetWindow, 'load', null, false); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.dispatchEvent.call(targetWindow, new Event('click')); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.clearTimeout.call(targetWindow, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.clearInterval.call(targetWindow, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.print.call(targetWindow); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.stop.call(targetWindow); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.alert.call(targetWindow, 'message'); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.scrollBy.call(targetWindow, 0, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.scrollTo.call(targetWindow, 0, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.scroll.call(targetWindow, 0, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.moveBy.call(targetWindow, 0, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.moveTo.call(targetWindow, 0, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.resizeBy.call(targetWindow, 0, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.resizeTo.call(targetWindow, 0, 0); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS window.showModalDialog.call(targetWindow); threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
</ins><span class="cx"> PASS: window.eval.call(targetWindow, '1+2'); should be '3' and is.
</span><del>-PASS: window.location.toString.call(targetWindow.location) should be 'undefined' and is.
</del><ins>+PASS window.location.toString.call(targetWindow.location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
</ins><span class="cx"> PASS: targetWindow.history should be 'undefined' and is.
</span><ins>+PASS: successfullyParsed should be 'true' and is.
</ins><span class="cx">
</span><ins>+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossframeaccesscallhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-frame-access-call.html (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-frame-access-call.html        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/cross-frame-access-call.html        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> <html>
</span><span class="cx"> <head>
</span><ins>+ <script src="/js-test-resources/js-test-pre.js"></script>
</ins><span class="cx"> <script src="resources/cross-frame-access.js"></script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span><span class="lines">@@ -6,18 +7,16 @@
</span><span class="cx"> <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get-test.html" style=""></iframe>
</span><span class="cx"> <pre id="console"></pre>
</span><span class="cx"> <script>
</span><ins>+description("Tests for calling methods of another frame using Function.call");
+jsTestIsAsync = true;
</ins><span class="cx">
</span><span class="cx"> window.targetWindow = frames[0];
</span><span class="cx">
</span><span class="cx"> window.onload = function()
</span><span class="cx"> {
</span><del>- if (window.testRunner) {
</del><ins>+ if (window.testRunner)
</ins><span class="cx"> testRunner.setCanOpenWindows(true);
</span><del>- testRunner.dumpAsText();
- }
</del><span class="cx">
</span><del>- log("\n----- tests for calling methods of another frame using Function.call -----\n");
-
</del><span class="cx"> // Allowed
</span><span class="cx"> // void focus();
</span><span class="cx"> // void blur();
</span><span class="lines">@@ -26,36 +25,36 @@
</span><span class="cx">
</span><span class="cx"> // - Tests for the Window object -
</span><span class="cx"> // undefined value indicates failure
</span><del>- shouldBe("window.setTimeout.call(targetWindow, 'void(0);', 0)", "undefined");
- shouldBe("window.setInterval.call(targetWindow, 'void(0);', 0)", "undefined");
- shouldBe("window.getSelection.call(targetWindow)", "undefined");
- shouldBe("window.find.call(targetWindow, 'string', false, false, false, false, false, false)", "undefined");
- shouldBe("window.confirm.call(targetWindow, 'message')", "undefined");
- shouldBe("window.prompt.call(targetWindow, 'message', 'defaultValue')", "undefined");
- shouldBe("window.getComputedStyle.call(targetWindow, document.body, '')", "undefined");
- shouldBe("window.getMatchedCSSRules.call(targetWindow, document.body, '')", "undefined");
- shouldBe("window.openDatabase.call(targetWindow, 'name', '1.0', 'description', 0)", "undefined");
- shouldBe("window.atob.call(targetWindow, 'string')", "undefined");
- shouldBe("window.btoa.call(targetWindow, 'string')", "undefined");
- shouldBe("window.open.call(targetWindow, '')", "undefined");
</del><ins>+ shouldThrowErrorName("window.setTimeout.call(targetWindow, 'void(0);', 0)", "SecurityError");
+ shouldThrowErrorName("window.setInterval.call(targetWindow, 'void(0);', 0)", "SecurityError");
+ shouldThrowErrorName("window.getSelection.call(targetWindow)", "SecurityError");
+ shouldThrowErrorName("window.find.call(targetWindow, 'string', false, false, false, false, false, false)", "SecurityError");
+ shouldThrowErrorName("window.confirm.call(targetWindow, 'message')", "SecurityError");
+ shouldThrowErrorName("window.prompt.call(targetWindow, 'message', 'defaultValue')", "SecurityError");
+ shouldThrowErrorName("window.getComputedStyle.call(targetWindow, document.body, '')", "SecurityError");
+ shouldThrowErrorName("window.getMatchedCSSRules.call(targetWindow, document.body, '')", "SecurityError");
+ shouldThrowErrorName("window.openDatabase.call(targetWindow, 'name', '1.0', 'description', 0)", "SecurityError");
+ shouldThrowErrorName("window.atob.call(targetWindow, 'string')", "SecurityError");
+ shouldThrowErrorName("window.btoa.call(targetWindow, 'string')", "SecurityError");
+ shouldThrowErrorName("window.open.call(targetWindow, '')", "SecurityError");
</ins><span class="cx">
</span><span class="cx"> // These always return undefined so we use the error console to detect failure
</span><del>- shouldBe("window.addEventListener.call(targetWindow, 'load', null, false);", "undefined");
- shouldBe("window.removeEventListener.call(targetWindow, 'load', null, false);", "undefined");
- shouldBe("window.dispatchEvent.call(targetWindow, new Event('click'));", "undefined");
- shouldBe("window.clearTimeout.call(targetWindow, 0);", "undefined");
- shouldBe("window.clearInterval.call(targetWindow, 0);", "undefined");
- shouldBe("window.print.call(targetWindow);", "undefined");
- shouldBe("window.stop.call(targetWindow);", "undefined");
- shouldBe("window.alert.call(targetWindow, 'message');", "undefined");
- shouldBe("window.scrollBy.call(targetWindow, 0, 0);", "undefined");
- shouldBe("window.scrollTo.call(targetWindow, 0, 0);", "undefined");
- shouldBe("window.scroll.call(targetWindow, 0, 0);", "undefined");
- shouldBe("window.moveBy.call(targetWindow, 0, 0);", "undefined");
- shouldBe("window.moveTo.call(targetWindow, 0, 0);", "undefined");
- shouldBe("window.resizeBy.call(targetWindow, 0, 0);", "undefined");
- shouldBe("window.resizeTo.call(targetWindow, 0, 0);", "undefined");
- shouldBe("window.showModalDialog.call(targetWindow);", "undefined");
</del><ins>+ shouldThrowErrorName("window.addEventListener.call(targetWindow, 'load', null, false);", "SecurityError");
+ shouldThrowErrorName("window.removeEventListener.call(targetWindow, 'load', null, false);", "SecurityError");
+ shouldThrowErrorName("window.dispatchEvent.call(targetWindow, new Event('click'));", "SecurityError");
+ shouldThrowErrorName("window.clearTimeout.call(targetWindow, 0);", "SecurityError");
+ shouldThrowErrorName("window.clearInterval.call(targetWindow, 0);", "SecurityError");
+ shouldThrowErrorName("window.print.call(targetWindow);", "SecurityError");
+ shouldThrowErrorName("window.stop.call(targetWindow);", "SecurityError");
+ shouldThrowErrorName("window.alert.call(targetWindow, 'message');", "SecurityError");
+ shouldThrowErrorName("window.scrollBy.call(targetWindow, 0, 0);", "SecurityError");
+ shouldThrowErrorName("window.scrollTo.call(targetWindow, 0, 0);", "SecurityError");
+ shouldThrowErrorName("window.scroll.call(targetWindow, 0, 0);", "SecurityError");
+ shouldThrowErrorName("window.moveBy.call(targetWindow, 0, 0);", "SecurityError");
+ shouldThrowErrorName("window.moveTo.call(targetWindow, 0, 0);", "SecurityError");
+ shouldThrowErrorName("window.resizeBy.call(targetWindow, 0, 0);", "SecurityError");
+ shouldThrowErrorName("window.resizeTo.call(targetWindow, 0, 0);", "SecurityError");
+ shouldThrowErrorName("window.showModalDialog.call(targetWindow);", "SecurityError");
</ins><span class="cx">
</span><span class="cx"> // Throws an EvalError and logs to the error console
</span><span class="cx"> shouldBe("window.eval.call(targetWindow, '1+2');", '3');
</span><span class="lines">@@ -62,7 +61,7 @@
</span><span class="cx">
</span><span class="cx"> // - Tests for the Location object -
</span><span class="cx"> // undefined value indicates failure
</span><del>- shouldBe("window.location.toString.call(targetWindow.location)", "undefined");
</del><ins>+ shouldThrowErrorName("window.location.toString.call(targetWindow.location)", "SecurityError");
</ins><span class="cx">
</span><span class="cx"> // - Tests for the History object -
</span><span class="cx"> shouldBeUndefined("targetWindow.history");
</span><span class="lines">@@ -69,7 +68,10 @@
</span><span class="cx">
</span><span class="cx"> // Work around DRT bug that causes subsequent tests to fail.
</span><span class="cx"> window.stop();
</span><ins>+
+ finishJSTest();
</ins><span class="cx"> }
</span><span class="cx"> </script>
</span><ins>+<script src="/js-test-resources/js-test-post.js"></script>
</ins><span class="cx"> </body>
</span><span class="cx"> </html>
</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 (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,9 +1,3 @@
</span><del>-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</del><span class="cx"> CONSOLE MESSAGE: line 15: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</span><span class="cx"> CONSOLE MESSAGE: line 15: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</span><span class="cx"> Tests that using another window's property getter does not bypass cross-origin checks.
</span><span class="lines">@@ -11,12 +5,12 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx">
</span><span class="cx">
</span><del>-PASS Object.getOwnPropertyDescriptor(window, "document").get.call(crossOriginWindow) returned undefined.
-PASS Object.getOwnPropertyDescriptor(window, "name").get.call(crossOriginWindow) returned undefined.
-PASS Object.getOwnPropertyDescriptor(window, "menubar").get.call(crossOriginWindow) returned undefined.
-PASS Object.getOwnPropertyDescriptor(window, "scrollbars").get.call(crossOriginWindow) returned undefined.
-PASS Object.getOwnPropertyDescriptor(window, "navigator").get.call(crossOriginWindow) returned undefined.
-PASS Object.getOwnPropertyDescriptor(window, "screenX").get.call(crossOriginWindow) returned undefined.
</del><ins>+PASS Object.getOwnPropertyDescriptor(window, "document").get.call(crossOriginWindow) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window, "name").get.call(crossOriginWindow) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window, "menubar").get.call(crossOriginWindow) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window, "scrollbars").get.call(crossOriginWindow) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window, "navigator").get.call(crossOriginWindow) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window, "screenX").get.call(crossOriginWindow) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(window.__proto__, "constructor").get.call(crossOriginWindow) threw exception TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(window.__proto__, "constructor").get.call').
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(window.__proto__, "constructor").get.call(crossOriginWindow.__proto__) threw exception TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(window.__proto__, "constructor").get.call').
</span><span class="cx"> PASS crossOriginWindow.constructor returned undefined.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritylocationcrossoriginexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/location-cross-origin-expected.txt (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/location-cross-origin-expected.txt        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/location-cross-origin-expected.txt        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,14 +1,3 @@
</span><del>-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 1: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</del><span class="cx"> Test security checking for access to Location.
</span><span class="cx">
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="lines">@@ -27,17 +16,17 @@
</span><span class="cx"> PASS frames[0].location.reload() threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
</span><span class="cx"> PASS frames[0].location.assign('about:blank') threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
</span><span class="cx"> PASS frames[0].location.href threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
</span><del>-PASS Object.getOwnPropertyDescriptor(window.location, 'protocol').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'host').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'hostname').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'port').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'pathname').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'search').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'hash').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'origin').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'ancestorOrigins').get.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'toString').value.call(frames[0].location) is undefined.
-PASS Object.getOwnPropertyDescriptor(window.location, 'href').get.call(frames[0].location) is undefined.
</del><ins>+PASS Object.getOwnPropertyDescriptor(window.location, 'protocol').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'host').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'hostname').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'port').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'pathname').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'search').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'hash').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'origin').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'ancestorOrigins').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'toString').value.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
+PASS Object.getOwnPropertyDescriptor(window.location, 'href').get.call(frames[0].location) threw exception SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match..
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritylocationcrossoriginhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/location-cross-origin.html (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/location-cross-origin.html        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/location-cross-origin.html        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -22,18 +22,17 @@
</span><span class="cx"> shouldThrowErrorName("frames[0].location.assign('about:blank')", "SecurityError");
</span><span class="cx"> shouldThrowErrorName("frames[0].location.href", "SecurityError");
</span><span class="cx">
</span><del>- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'protocol').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'host').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'hostname').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'port').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'pathname').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'search').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'hash').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'origin').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'ancestorOrigins').get.call(frames[0].location)");
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'toString').value.call(frames[0].location)");
- // The specification seems to allow access to href but Firefox does not.
- shouldBeUndefined("Object.getOwnPropertyDescriptor(window.location, 'href').get.call(frames[0].location)");
</del><ins>+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'protocol').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'host').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'hostname').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'port').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'pathname').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'search').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'hash').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'origin').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'ancestorOrigins').get.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'toString').value.call(frames[0].location)", "SecurityError");
+ shouldThrowErrorName("Object.getOwnPropertyDescriptor(window.location, 'href').get.call(frames[0].location)", "SecurityError");
</ins><span class="cx">
</span><span class="cx"> finishJSTest();
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDassignlocationhrefjavascriptexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-assign-location-href-javascript-expected.txt        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> CONSOLE MESSAGE: line 13: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</span><del>-CONSOLE MESSAGE: line 13: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</del><ins>+CONSOLE MESSAGE: line 9: SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</ins><span class="cx">
</span><span class="cx">
</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 (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> CONSOLE MESSAGE: line 37: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</span><del>-CONSOLE MESSAGE: line 42: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
-CONSOLE MESSAGE: line 47: Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
</del><ins>+CONSOLE MESSAGE: line 40: TypeError: targetWindow.setTimeout is not a function. (In 'targetWindow.setTimeout(callback, 0, this)', 'targetWindow.setTimeout' is undefined)
+CONSOLE MESSAGE: line 47: SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". Protocols, domains, and ports must match.
+CONSOLE MESSAGE: line 54: SecurityError (DOM Exception 18): Blocked a frame with origin "http://127.0.0.1:8000" from accessing a frame with origin "http://localhost:8000". 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><del>-PASS: this.wasInvoked should be 'false' and is.
</del><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecurityxssDENIEDmethodwithiframeprotohtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto.html (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto.html        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/LayoutTests/http/tests/security/xss-DENIED-method-with-iframe-proto.html        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -36,17 +36,23 @@
</span><span class="cx"> try {
</span><span class="cx"> targetWindow.setTimeout(callback, 0, this);
</span><span class="cx"> needsCheck = true;
</span><del>- } catch (e) { }
</del><ins>+ } catch (e) {
+ console.log(e);
+ }
</ins><span class="cx">
</span><span class="cx"> try {
</span><span class="cx"> setTimeout.call(targetWindow, callback, 0, this);
</span><span class="cx"> needsCheck = true;
</span><del>- } catch(e) { }
</del><ins>+ } catch(e) {
+ console.log(e);
+ }
</ins><span class="cx">
</span><span class="cx"> try {
</span><span class="cx"> originalSetTimeout.call(targetWindow, callback, 0, this);
</span><span class="cx"> needsCheck = true;
</span><del>- } catch(e) { }
</del><ins>+ } catch(e) {
+ console.log(e);
+ }
</ins><span class="cx">
</span><span class="cx"> if (needsCheck) {
</span><span class="cx"> originalSetTimeout(check, 10);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/Source/WebCore/ChangeLog        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -1,5 +1,29 @@
</span><span class="cx"> 2016-08-27 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Update generated bindings to throw a SecurityError when denying cross-origin access to properties
+ https://bugs.webkit.org/show_bug.cgi?id=161270
+
+ Reviewed by Darin Adler.
+
+ Update generated bindings to throw a SecurityError when denying cross-origin
+ access to properties, as per the HTML specification:
+ - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
+ - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
+
+ Firefox and Chrome already throw but Webkit was logging an error message and
+ returning undefined instead.
+
+ No new tests, updated existing tests.
+
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::canAccessDocument):
+ (WebCore::BindingSecurity::shouldAllowAccessToNode):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation):
+
+2016-08-27 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Follow-up fixes after r205030.
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=161216
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -760,7 +760,7 @@
</span><span class="cx"> return asJSDOMWindow(exec->vmEntryGlobalObject())->wrapped();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static inline bool canAccessDocument(JSC::ExecState* state, Document* targetDocument, SecurityReportingOption reportingOption = ReportSecurityError)
</del><ins>+static inline bool canAccessDocument(JSC::ExecState* state, Document* targetDocument, SecurityReportingOption reportingOption)
</ins><span class="cx"> {
</span><span class="cx"> if (!targetDocument)
</span><span class="cx"> return false;
</span><span class="lines">@@ -770,8 +770,16 @@
</span><span class="cx"> if (active.document()->securityOrigin()->canAccess(targetDocument->securityOrigin()))
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (reportingOption == ReportSecurityError)
</del><ins>+ switch (reportingOption) {
+ case ThrowSecurityError:
+ throwSecurityError(*state, targetDocument->domWindow()->crossDomainAccessErrorMessage(active));
+ break;
+ case LogSecurityError:
</ins><span class="cx"> printErrorMessageForFrame(targetDocument->frame(), targetDocument->domWindow()->crossDomainAccessErrorMessage(active));
</span><ins>+ break;
+ case DoNotReportSecurityError:
+ break;
+ }
</ins><span class="cx">
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -788,7 +796,7 @@
</span><span class="cx">
</span><span class="cx"> bool BindingSecurity::shouldAllowAccessToNode(JSC::ExecState* state, Node* target)
</span><span class="cx"> {
</span><del>- return target && canAccessDocument(state, &target->document());
</del><ins>+ return target && canAccessDocument(state, &target->document(), LogSecurityError);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static EncodedJSValue throwTypeError(JSC::ExecState& state, const String& errorMessage)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -297,13 +297,17 @@
</span><span class="cx"> bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, String& message);
</span><span class="cx"> bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, String& message);
</span><span class="cx">
</span><del>-enum SecurityReportingOption { DoNotReportSecurityError, ReportSecurityError };
</del><ins>+enum SecurityReportingOption {
+ DoNotReportSecurityError,
+ LogSecurityError, // Legacy behavior.
+ ThrowSecurityError
+};
</ins><span class="cx">
</span><span class="cx"> class BindingSecurity {
</span><span class="cx"> public:
</span><span class="cx"> static bool shouldAllowAccessToNode(JSC::ExecState*, Node*);
</span><del>- static bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, SecurityReportingOption = ReportSecurityError);
- static bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, SecurityReportingOption = ReportSecurityError);
</del><ins>+ static bool shouldAllowAccessToDOMWindow(JSC::ExecState*, DOMWindow&, SecurityReportingOption = LogSecurityError);
+ static bool shouldAllowAccessToFrame(JSC::ExecState*, Frame*, SecurityReportingOption = LogSecurityError);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> void printErrorMessageForFrame(Frame*, const String& message);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -2863,9 +2863,9 @@
</span><span class="cx"> !$attribute->signature->extendedAttributes->{"DoNotCheckSecurity"} &&
</span><span class="cx"> !$attribute->signature->extendedAttributes->{"DoNotCheckSecurityOnGetter"}) {
</span><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><del>- push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped()))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
</ins><span class="cx"> } else {
</span><del>- push(@implContent, " if (!shouldAllowAccessToFrame(state, castedThis->wrapped().frame()))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))\n");
</ins><span class="cx"> }
</span><span class="cx"> push(@implContent, " return JSValue::encode(jsUndefined());\n");
</span><span class="cx"> }
</span><span class="lines">@@ -3127,9 +3127,9 @@
</span><span class="cx"> }
</span><span class="cx"> if ($interface->extendedAttributes->{"CheckSecurity"} && !$attribute->signature->extendedAttributes->{"DoNotCheckSecurity"}) {
</span><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><del>- push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped()))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
</ins><span class="cx"> } else {
</span><del>- push(@implContent, " if (!shouldAllowAccessToFrame(state, castedThis->wrapped().frame()))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))\n");
</ins><span class="cx"> }
</span><span class="cx"> push(@implContent, " return false;\n");
</span><span class="cx"> }
</span><span class="lines">@@ -3425,9 +3425,9 @@
</span><span class="cx">
</span><span class="cx"> if ($interface->extendedAttributes->{"CheckSecurity"} and !$function->signature->extendedAttributes->{"DoNotCheckSecurity"}) {
</span><span class="cx"> if ($interfaceName eq "DOMWindow") {
</span><del>- push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped()))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped(), ThrowSecurityError))\n");
</ins><span class="cx"> } else {
</span><del>- push(@implContent, " if (!shouldAllowAccessToFrame(state, castedThis->wrapped().frame()))\n");
</del><ins>+ push(@implContent, " if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))\n");
</ins><span class="cx"> }
</span><span class="cx"> push(@implContent, " return JSValue::encode(jsUndefined());\n");
</span><span class="cx"> }
</span><span class="lines">@@ -3449,7 +3449,7 @@
</span><span class="cx"> if ($interface->name eq "EventTarget") {
</span><span class="cx"> $implIncludes{"DOMWindow.h"} = 1;
</span><span class="cx"> push(@implContent, " if (auto* window = castedThis->wrapped().toDOMWindow()) {\n");
</span><del>- push(@implContent, " if (!window->frame() || !BindingSecurity::shouldAllowAccessToDOMWindow(state, *window))\n");
</del><ins>+ push(@implContent, " if (!window->frame() || !BindingSecurity::shouldAllowAccessToDOMWindow(state, *window, ThrowSecurityError))\n");
</ins><span class="cx"> push(@implContent, " return JSValue::encode(jsUndefined());\n");
</span><span class="cx"> push(@implContent, " }\n");
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (205095 => 205096)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-08-28 05:24:39 UTC (rev 205095)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-08-28 05:29:05 UTC (rev 205096)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx"> if (UNLIKELY(!castedThis)) {
</span><span class="cx"> return throwGetterTypeError(*state, "TestActiveDOMObject", "excitingAttr");
</span><span class="cx"> }
</span><del>- if (!shouldAllowAccessToFrame(state, castedThis->wrapped().frame()))
</del><ins>+ if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))
</ins><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="cx"> auto& impl = castedThis->wrapped();
</span><span class="cx"> JSValue result = jsNumber(impl.excitingAttr());
</span><span class="lines">@@ -189,7 +189,7 @@
</span><span class="cx"> if (UNLIKELY(!castedThis))
</span><span class="cx"> return throwThisTypeError(*state, "TestActiveDOMObject", "excitingFunction");
</span><span class="cx"> ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
</span><del>- if (!shouldAllowAccessToFrame(state, castedThis->wrapped().frame()))
</del><ins>+ if (!BindingSecurity::shouldAllowAccessToFrame(state, castedThis->wrapped().frame(), ThrowSecurityError))
</ins><span class="cx"> return JSValue::encode(jsUndefined());
</span><span class="cx"> auto& impl = castedThis->wrapped();
</span><span class="cx"> if (UNLIKELY(state->argumentCount() < 1))
</span></span></pre>
</div>
</div>
</body>
</html>