Skip to content

Commit

Permalink
Use globals rather than origins in crossOriginKey
Browse files Browse the repository at this point in the history
This has been wrong since we introduced the
CrossOriginPropertyDescriptorMap in
acae3df. Instead of using globals as
roughly suggested in
https://github.com/annevk/html-cross-origin-objects/blob/master/lore.txt
 the “effective script origin” of those globals was used instead.

Then in 8a843f2 when “effective script
origin” was merged into “origin” this was worsened by only using the
“origin’s effective domain” in the key rather than the whole origin.

This fixes #2012 by using globals instead as always intended but not
written down before now.
  • Loading branch information
annevk authored and domenic committed Nov 22, 2016
1 parent 2c8eef6 commit febd713
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -77983,10 +77983,10 @@ console.assert(iframeWindow.frameElement === null);
map.

<p class="note">The [[<span>CrossOriginPropertyDescriptorMap</span>]] internal slot contains a map
with entries whose keys are (<var>currentOrigin</var>, <var>objectOrigin</var>,
with entries whose keys are (<var>currentGlobal</var>, <var>objectGlobal</var>,
<var>propertyKey</var>)-tuples and values are property descriptors, as a memoization of what is
visible to scripts when <var>currentOrigin</var> inspects a <code>Window</code> or
<code>Location</code> object from <var>objectOrigin</var>. It is filled lazily by
visible to scripts when <var>currentGlobal</var> inspects a <code>Window</code> or
<code>Location</code> object from <var>objectGlobal</var>. It is filled lazily by
<span>CrossOriginGetOwnPropertyHelper</span>, which consults it on future lookups.</p>

<p>User agents should allow a value held in the map to be garbage collected along with its
Expand Down Expand Up @@ -78073,10 +78073,7 @@ console.assert(iframeWindow.frameElement === null);
[[Configurable]]: true }.</p></li>

<li><p>Let <var>crossOriginKey</var> be a tuple consisting of the <span>current settings
object</span>'s <span data-x="concept-settings-object-origin">origin</span>'s <span
data-x="concept-origin-effective-domain">effective domain</span>, <var>O</var>'s <span>relevant
settings object</span>'s <span data-x="concept-settings-object-origin">origin</span>'s <span
data-x="concept-origin-effective-domain">effective domain</span>, and <var>P</var>.</p></li>
object</span>, <var>O</var>'s <span>relevant settings object</span>, and <var>P</var>.</p></li>

<li>
<p>Repeat for each <var>e</var> that is an element of
Expand Down

0 comments on commit febd713

Please sign in to comment.