Skip to content

Commit

Permalink
Make window.postMessage grab settings objects before going async
Browse files Browse the repository at this point in the history
Fixes #894.
  • Loading branch information
domenic committed Mar 23, 2016
1 parent 0866f1b commit 26f5645
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -92771,6 +92771,9 @@ function receiver(e) {
<li><p>Let <var>targetRealm</var> be this <code>Window</code> object's <span
data-x="concept-global-object-realm">Realm</span>.</p></li>

<li><p>Let <var>entrySettings</var> be the <span>entry settings object</span>.</p></li>

<li><p>Let <var>incumbentSettings</var> be the <span>incumbent settings object</span>.</p></li>

<li><p>Let <var>cloneRecord</var> be <span>StructuredCloneWithTransfer</span>(<var>message</var>,
<var>transfer</var>, <var>targetRealm</var>). Rethrow any exceptions.</p></li>
Expand All @@ -92789,8 +92792,7 @@ function receiver(e) {
<p>If the <var>targetOrigin</var> argument is a single literal U+002F SOLIDUS
character (/), and the <code>Document</code> of the <code>Window</code> object on which the
method was invoked does not have the <span>same origin</span> as the <span>responsible
document</span> specified by the <span>entry settings object</span>, then abort these steps
silently.</p>
document</span> specified by <var>entrySettings</var>, then abort these steps silently.</p>

<p>Otherwise, if the <var>targetOrigin</var> argument is an <span>absolute URL</span>,
and the <code>Document</code> of the <code>Window</code> object on which the method was invoked
Expand All @@ -92809,11 +92811,11 @@ function receiver(e) {
initialised to the value of <var>message clone</var>, the <code
data-x="dom-MessageEvent-origin">origin</code> attribute must be initialised to the <span
data-x="Unicode serialisation of an origin">Unicode serialisation</span> of the
<span>origin</span> specified by the <span>incumbent settings object</span>, the <code
<span>origin</span> specified by <var>incumbentSettings</var>, the <code
data-x="dom-MessageEvent-source">source</code> attribute must be initialised to the
<code>WindowProxy</code> object corresponding to the <span
data-x="concept-settings-object-global">global object</span> (a <code>Window</code> object)
specified by the <span>incumbent settings object</span>, and the <code
specified by <var>incumbentSettings</var>, and the <code
data-x="dom-MessageEvent-ports">ports</code> attribute must be initialised to the <var>new
ports</var> array.</p></li> <!-- invariant: the global object is always a Window if the script
can see this method -->
Expand Down

0 comments on commit 26f5645

Please sign in to comment.