Skip to content

Commit 1529ed1

Browse files
committed
Correct CrossOriginProperties and callers
Having CrossOriginProperties include the document-tree child browsing context name properties was incorrect for all its callers. The IDL object they are defined upon is not accessible across origins. CrossOriginGetOwnPropertyHelper would end up checking the [[Value]] slot of undefined (i.e., a specification error), as they are not own properties of the global object. And CrossOriginOwnPropertyKeys was excluding them deliberately (though then for "then" incorrectly assuming they were included anyway). WPT html/browsers/origin/cross-origin-objects/cross-origin-objects.html seems to be testing all this as expected. Closes #5393.
1 parent edf19e2 commit 1529ed1

File tree

1 file changed

+8
-32
lines changed

1 file changed

+8
-32
lines changed

source

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -77373,8 +77373,7 @@ console.assert(iframeWindow.frameElement === null);
7737377373
then return.</p>
7737477374

7737577375
<li>
77376-
<p>Repeat for each <var>e</var> that is an element of !
77377-
<span>CrossOriginProperties</span>(<var>platformObject</var>):</p>
77376+
<p>For each <var>e</var> of ! <span>CrossOriginProperties</span>(<var>platformObject</var>):</p>
7737877377

7737977378
<ol>
7738077379
<li>
@@ -77443,7 +77442,7 @@ console.assert(iframeWindow.frameElement === null);
7744377442
{ [[Property]]: "<code data-x="">href</code>", [[NeedsGet]]: false, [[NeedsSet]]: true },
7744477443
{ [[Property]]: "<code data-x="">replace</code>" } ».</p></li>
7744577444

77446-
<li><p>Let <var>crossOriginWindowProperties</var> be «
77445+
<li><p>Return «
7744777446
{ [[Property]]: "<code data-x="">window</code>", [[NeedsGet]]: true, [[NeedsSet]]: false },
7744877447
{ [[Property]]: "<code data-x="">self</code>", [[NeedsGet]]: true, [[NeedsSet]]: false },
7744977448
{ [[Property]]: "<code data-x="">location</code>", [[NeedsGet]]: true, [[NeedsSet]]: true },
@@ -77457,18 +77456,6 @@ console.assert(iframeWindow.frameElement === null);
7745777456
{ [[Property]]: "<code data-x="">opener</code>", [[NeedsGet]]: true, [[NeedsSet]]: false },
7745877457
{ [[Property]]: "<code data-x="">parent</code>", [[NeedsGet]]: true, [[NeedsSet]]: false },
7745977458
{ [[Property]]: "<code data-x="">postMessage</code>" } ».</p></li>
77460-
77461-
<li>
77462-
<p>Repeat for each <var>e</var> that is an element of <var>O</var>'s <span>document-tree child
77463-
browsing context name property set</span>:</p>
77464-
77465-
<ol>
77466-
<li><p>Add { [[Property]]: <var>e</var>, [[HideFromKeys]]: true } as the last element of
77467-
<var>crossOriginWindowProperties</var>.</p></li>
77468-
</ol>
77469-
</li>
77470-
77471-
<li><p>Return <var>crossOriginWindowProperties</var>.</p></li>
7747277459
</ol>
7747377460

7747477461
<p class="note">Indexed properties do not need to be safelisted as they are handled directly by
@@ -77508,8 +77495,7 @@ console.assert(iframeWindow.frameElement === null);
7750877495
object</span>, <var>O</var>'s <span>relevant settings object</span>, and <var>P</var>.</p></li>
7750977496

7751077497
<li>
77511-
<p>Repeat for each <var>e</var> that is an element of !
77512-
<span>CrossOriginProperties</span>(<var>O</var>):</p>
77498+
<p>For each <var>e</var> of ! <span>CrossOriginProperties</span>(<var>O</var>):</p>
7751377499

7751477500
<ol>
7751577501
<li>
@@ -77641,22 +77627,12 @@ console.assert(iframeWindow.frameElement === null);
7764177627
<ol>
7764277628
<li><p>Let <var>keys</var> be a new empty <span data-x="js-List">List</span>.</p></li>
7764377629

77644-
<li>
77645-
<p>Repeat for each <var>e</var> that is an element of !
77646-
<span>CrossOriginProperties</span>(<var>O</var>):</p>
77647-
77648-
<ol>
77649-
<li><p>If <var>e</var>.[[HideFromKeys]] is not true, <span data-x="list append">append</span>
77650-
<var>e</var>.[[Property]] to <var>keys</var>.</p></li>
77651-
</ol>
77652-
</li>
77653-
77654-
<li><p>If <var>keys</var> <span data-x="list contains">does not contain</span> "<code
77655-
data-x="">then</code>", then <span data-x="list append">append</span> "<code
77656-
data-x="">then</code>" to <var>keys</var>.</p></li>
77630+
<li><p>For each <var>e</var> of ! <span>CrossOriginProperties</span>(<var>O</var>), <span
77631+
data-x="list append">append</span> <var>e</var>.[[Property]] to <var>keys</var>.</p></li>
7765777632

77658-
<li><p>Return the concatenation of <var>keys</var> and « <span>@@toStringTag</span>,
77659-
<span>@@hasInstance</span>, <span>@@isConcatSpreadable</span> ».</p></li>
77633+
<li><p>Return the concatenation of <var>keys</var> and « "<code data-x="">then</code>",
77634+
<span>@@toStringTag</span>, <span>@@hasInstance</span>, <span>@@isConcatSpreadable</span>
77635+
».</p></li>
7766077636
</ol>
7766177637

7766277638
</div>

0 commit comments

Comments
 (0)