Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26f5645

Browse files
committed
Make window.postMessage grab settings objects before going async
Fixes whatwg#894.
1 parent 0866f1b commit 26f5645

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source

+6-4
Original file line numberDiff line numberDiff line change
@@ -92771,6 +92771,9 @@ function receiver(e) {
9277192771
<li><p>Let <var>targetRealm</var> be this <code>Window</code> object's <span
9277292772
data-x="concept-global-object-realm">Realm</span>.</p></li>
9277392773

92774+
<li><p>Let <var>entrySettings</var> be the <span>entry settings object</span>.</p></li>
92775+
92776+
<li><p>Let <var>incumbentSettings</var> be the <span>incumbent settings object</span>.</p></li>
9277492777

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

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

0 commit comments

Comments
 (0)