Skip to content

Commit 47a3b9b

Browse files
committed
Update to HTML changes for ShadowRealms
1 parent 4381866 commit 47a3b9b

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

index.bs

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6036,7 +6036,7 @@ about the execution context at the time the language binding specific object ref
60366036
converted to an IDL value.
60376037

60386038
Note: For JavaScript objects, the [=callback context=] is used to hold a reference to the
6039-
<a spec="HTML">incumbent settings object</a> at the time the Object value is converted to an IDL
6039+
<a spec="HTML">incumbent realm</a> at the time the Object value is converted to an IDL
60406040
callback interface type value. See [[#js-callback-interface]].
60416041

60426042
There is no way to represent a constant object reference value for a particular
@@ -6085,7 +6085,7 @@ An IDL value of the callback function type is represented by a tuple of an objec
60856085
reference and a [=callback context=].
60866086

60876087
Note: As with [=callback interface types=], the [=callback context=] is used to hold a
6088-
reference to the <a spec="HTML">incumbent settings object</a> at
6088+
reference to the <a spec="HTML">incumbent realm</a> at
60896089
the time a JavaScript Object value is converted to an IDL
60906090
callback function type value. See [[#js-callback-function]].
60916091

@@ -7783,7 +7783,7 @@ values are represented by JavaScript Object values (including [=function objects
77837783

77847784
1. If <a abstract-op>Type</a>(|V|) is not Object, then [=JavaScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
77857785
1. Return the IDL [=callback interface type=] value that represents a reference to |V|, with
7786-
the <a spec="HTML">incumbent settings object</a> as the [=callback context=].
7786+
the <a spec="HTML">incumbent realm</a> as the [=callback context=].
77877787
</div>
77887788

77897789
<p id="callback-interface-to-js">
@@ -7911,7 +7911,7 @@ IDL [=callback function types=] are represented by JavaScript [=function objects
79117911
then [=JavaScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
79127912
1. Return the IDL [=callback function type=] value
79137913
that represents a reference to the same object that |V| represents, with the
7914-
<a spec="HTML">incumbent settings object</a> as the [=callback context=].
7914+
<a spec="HTML">incumbent realm</a> as the [=callback context=].
79157915
</div>
79167916

79177917
<p id="callback-function-to-js">
@@ -9677,9 +9677,10 @@ Otherwise, it is the [=host interface=]'s [=exposure set=].
96779677

96789678
1. If |construct|'s [=exposure set=] is not <code>*</code>, and |realm|.\[[GlobalObject]] does
96799679
not implement an [=interface=] that is in |construct|'s [=exposure set=], then return false.
9680-
1. If |realm|'s [=realm/settings object=] is not a [=secure context=], and |construct| is
9681-
[=conditionally exposed=] on [{{SecureContext}}], then return false.
9682-
1. If |realm|'s [=realm/settings object=]'s
9680+
1. If |realm|'s [=realm/principal realm=]'s [=principal realm/settings object=] is not a
9681+
[=secure context=], and |construct| is [=conditionally exposed=] on [{{SecureContext}}],
9682+
then return false.
9683+
1. If |realm|'s [=realm/principal realm=]'s [=principal realm/settings object=]'s
96839684
[=environment settings object/cross-origin isolated capability=] is false, and |construct|
96849685
is [=conditionally exposed=] on [{{CrossOriginIsolated}}], then return false.
96859686
1. Return true.
@@ -14323,11 +14324,10 @@ the special value “missing”, which represents a missing optional argument.
1432314324
1. Let |completion| be an uninitialized variable.
1432414325
1. If |thisArg| was not given, let |thisArg| be <emu-val>undefined</emu-val>.
1432514326
1. Let |O| be the JavaScript object corresponding to |value|.
14326-
1. Let |realm| be |O|'s [=associated realm=].
14327-
1. Let |relevant settings| be |realm|'s [=realm/settings object=].
14328-
1. Let |stored settings| be |value|'s [=callback context=].
14329-
1. [=Prepare to run script=] with |relevant settings|.
14330-
1. [=Prepare to run a callback=] with |stored settings|.
14327+
1. Let |relevant realm| be |O|'s [=associated realm=].
14328+
1. Let |stored realm| be |value|'s [=callback context=].
14329+
1. [=Prepare to run script=] with |relevant realm|.
14330+
1. [=Prepare to run a callback=] with |stored realm|.
1433114331
1. Let |X| be |O|.
1433214332
1. If <a abstract-op>IsCallable</a>(|O|) is false, then:
1433314333
1. Let |getResult| be <a abstract-op>Completion</a>(<a abstract-op>Get</a>(|O|, |opName|)).
@@ -14352,8 +14352,8 @@ the special value “missing”, which represents a missing optional argument.
1435214352
representing the thrown exception.
1435314353
1. <i id="call-user-object-operation-return">Return:</i> at this
1435414354
point |completion| will be set to an IDL value or an [=abrupt completion=].
14355-
1. [=Clean up after running a callback=] with |stored settings|.
14356-
1. [=Clean up after running script=] with |relevant settings|.
14355+
1. [=Clean up after running a callback=] with |stored realm|.
14356+
1. [=Clean up after running script=] with |relevant realm|.
1435714357
1. If |completion| is an IDL value, return |completion|.
1435814358
1. If |completion| is an [=abrupt completion=] and the operation has a [=return type=]
1435914359
that is <em>not</em> a [=promise type=], throw |completion|.\[[Value]].
@@ -14434,11 +14434,10 @@ described in the previous section).
1443414434
marked with [{{LegacyTreatNonObjectAsNull}}].
1443514435
1. Return the result of [=converted to an IDL value|converting=]
1443614436
<emu-val>undefined</emu-val> to the callback function's return type.
14437-
1. Let |realm| be |F|'s [=associated realm=].
14438-
1. Let |relevant settings| be |realm|'s [=realm/settings object=].
14439-
1. Let |stored settings| be |callable|'s [=callback context=].
14440-
1. [=Prepare to run script=] with |relevant settings|.
14441-
1. [=Prepare to run a callback=] with |stored settings|.
14437+
1. Let |relevant realm| be |F|'s [=associated realm=].
14438+
1. Let |stored realm| be |callable|'s [=callback context=].
14439+
1. [=Prepare to run script=] with |relevant realm|.
14440+
1. [=Prepare to run a callback=] with |stored realm|.
1444214441
1. Let |jsArgs| be the result of [=Web IDL arguments list/converting=] |args| to a JavaScript
1444314442
arguments list. If this throws an exception, set |completion| to the completion value
1444414443
representing the thrown exception and jump to the step labeled
@@ -14452,14 +14451,15 @@ described in the previous section).
1445214451
representing the thrown exception.
1445314452
1. <i id="invoke-return">Return:</i> at this
1445414453
point |completion| will be set to an IDL value or an [=abrupt completion=].
14455-
1. [=Clean up after running a callback=] with |stored settings|.
14456-
1. [=Clean up after running script=] with |relevant settings|.
14454+
1. [=Clean up after running a callback=] with |stored realm|.
14455+
1. [=Clean up after running script=] with |relevant realm|.
1445714456
1. If |completion| is an IDL value, return |completion|.
1445814457
1. [=Assert=]: |completion| is an [=abrupt completion=].
1445914458
1. If |exceptionBehavior| is "<code>rethrow</code>", throw |completion|.\[[Value]].
1446014459
1. Otherwise, if |exceptionBehavior| is "<code>report</code>":
1446114460
1. [=Assert=]: |callable|'s [=return type=] is {{undefined}} or {{any}}.
14462-
1. [=Report an exception=] |completion|.\[[Value]] for |realm|'s [=realm/global object=].
14461+
1. [=Report an exception=] |completion|.\[[Value]] for |relevant realm|'s
14462+
[=realm/global object=].
1446314463
1. Return the unique {{undefined}} IDL value.
1446414464
1. [=Assert=]: |callable|'s [=return type=] is a [=promise type=].
1446514465
1. Let |rejectedPromise| be [=!=] <a abstract-op>Call</a>({{%Promise.reject%}},
@@ -14482,11 +14482,10 @@ a return type that is a [=promise type=].
1448214482
1. Let |F| be the JavaScript object corresponding to |callable|.
1448314483
1. If <a abstract-op>IsConstructor</a>(|F|) is <emu-val>false</emu-val>, throw a
1448414484
<l spec=ecmascript>{{TypeError}}</l> exception.
14485-
1. Let |realm| be |F|'s [=associated realm=].
14486-
1. Let |relevant settings| be |realm|'s [=realm/settings object=].
14487-
1. Let |stored settings| be |callable|'s [=callback context=].
14488-
1. [=Prepare to run script=] with |relevant settings|.
14489-
1. [=Prepare to run a callback=] with |stored settings|.
14485+
1. Let |relevant realm| be |F|'s [=associated realm=].
14486+
1. Let |stored realm| be |callable|'s [=callback context=].
14487+
1. [=Prepare to run script=] with |relevant realm|.
14488+
1. [=Prepare to run a callback=] with |stored realm|.
1449014489
1. Let |jsArgs| be the result of [=Web IDL arguments list/converting=] |args| to a JavaScript
1449114490
arguments list. If this throws an exception, set |completion| to the completion value
1449214491
representing the thrown exception and jump to the step labeled
@@ -14500,8 +14499,8 @@ a return type that is a [=promise type=].
1450014499
representing the thrown exception.
1450114500
1. <i id="construct-return">Return:</i> at this
1450214501
point |completion| will be set to an IDL value or an [=abrupt completion=].
14503-
1. [=Clean up after running a callback=] with |stored settings|.
14504-
1. [=Clean up after running script=] with |relevant settings|.
14502+
1. [=Clean up after running a callback=] with |stored realm|.
14503+
1. [=Clean up after running script=] with |relevant realm|.
1450514504
1. If |completion| is an [=abrupt completion=], throw |completion|.\[[Value]].
1450614505
1. Return |completion|.
1450714506
</div>

0 commit comments

Comments
 (0)