Skip to content

Commit d0d2cb4

Browse files
authored
Merge pull request #224 from dmcardle/fix-new-errors-from-bikeshed-5.0.0
[spec] Fix syntax errors detected by bikeshed 5.0.0
2 parents abafb9b + 142b735 commit d0d2cb4

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

spec.bs

+20-17
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,12 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
703703

704704
The {{Worklet/addModule()}} method steps for {{Worklet}} will need to include the following step before the step "Let |promise| be a new promise":
705705

706-
4. If |this| is of type {{SharedStorageWorklet}}:
707-
1. Let |addModuleAllowedResult| be the result of running [=check if addModule is allowed and update state=] given |this| and <var ignore=''>moduleURLRecord</var>.
706+
4. If [=this=] is of type {{SharedStorageWorklet}}:
707+
1. Let |addModuleAllowedResult| be the result of running [=check if addModule is allowed and update state=] given [=this=] and <var ignore=''>moduleURLRecord</var>.
708708
1. If |addModuleAllowedResult| is "DisallowedDueToNonPreferenceError":
709709
1. Return [=a promise rejected with=] a {{TypeError}}.
710710
1. Else if |addModuleAllowedResult| is "DisallowedDueToPreferenceError":
711-
1. If |this|'s [=SharedStorageWorklet/has cross-origin data origin=] is false, then return [=a promise rejected with=] a {{TypeError}}.
711+
1. If [=this=]'s [=SharedStorageWorklet/has cross-origin data origin=] is false, then return [=a promise rejected with=] a {{TypeError}}.
712712
1. Else:
713713
1. [=Assert=]: |addModuleAllowedResult| is "Allowed".
714714

@@ -722,7 +722,7 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
722722

723723
After the step "Let <var ignore=''>addedSuccessfully</var> be false", we need to include the following step:
724724

725-
4. If |this| is of type {{SharedStorageWorklet}}, [=SharedStorageWorklet/has cross-origin data origin=] is true, and [=SharedStorageWorklet/data origin=] is not `"script-origin"`:
725+
4. If [=this=] is of type {{SharedStorageWorklet}}, [=SharedStorageWorklet/has cross-origin data origin=] is true, and [=SharedStorageWorklet/data origin=] is not `"script-origin"`:
726726
1. [=Assert=] |pendingTasks| is 1.
727727
1. Set |pendingTasks| to 2.
728728
1. [=Queue a global task=] on the [=networking task source=] given <var ignore=''>workletGlobalScope</var> to perform the following steps:
@@ -758,7 +758,7 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
758758
1. Abort these steps.
759759
1. Let |doesMatch| be the result of running [=check for script and context origin match=] on |item|[`scriptOrigin`], <var ignore=''>moduleURLRecord</var>'s [=url/origin=], |item|[`contextOrigin`], and |outsideSettings|'s [=environment settings object/origin=].
760760
1. If |doesMatch| is true:
761-
1. [=Queue a global task=] on the [=networking task source=] given |this|'s [=relevant global object=] to perform the following steps:
761+
1. [=Queue a global task=] on the [=networking task source=] given [=this=]'s [=relevant global object=] to perform the following steps:
762762
1. If |pendingTasks| is not −1, then:
763763
1. Set |pendingTasks| to |pendingTasks| − 1.
764764
1. If |pendingTasks| is 0, perform the following steps:
@@ -779,9 +779,9 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
779779

780780
Just before the final step, currently "Return <var ignore>promise</var>.", add the following step:
781781

782-
7. If |this| is a {{SharedStorageWorklet}}, [=upon fulfillment=] of |promise| or
782+
7. If [=this=] is a {{SharedStorageWorklet}}, [=upon fulfillment=] of |promise| or
783783
[=upon rejection=] of |promise|, run the following steps:
784-
1. Let |globalScopes| be |this|'s [=Worklet/global scopes=].
784+
1. Let |globalScopes| be [=this=]'s [=Worklet/global scopes=].
785785
1. [=Assert=]: |globalScopes|' [=list/size=] equals 1.
786786
1. Let |privateAggregationObj| be |globalScopes|[0]'s
787787
{{SharedStorageWorkletGlobalScope/privateAggregation}}.
@@ -1487,14 +1487,15 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
14871487
1. Let |environment| be |context|'s [=active window=]'s [=relevant settings object=].
14881488
1. Let |databaseMap| be the result of running [=obtain a shared storage bottle map=] given |environment| and |environment|'s [=environment settings object/origin=].
14891489
1. If |databaseMap| is failure, throw a {{TypeError}}.
1490-
1. Set |this|'s [=SharedStorageSetMethod/key=] to |key|.
1491-
1. Set |this|'s [=SharedStorageSetMethod/value=] to |value|.
1492-
1. Set |this|'s [=SharedStorageSetMethod/ignore if present=] to |options|["{{SharedStorageSetMethodOptions/ignoreIfPresent}}"].
1490+
1. Set [=this=]'s [=SharedStorageSetMethod/key=] to |key|.
1491+
1. Set [=this=]'s [=SharedStorageSetMethod/value=] to |value|.
1492+
1. Set [=this=]'s [=SharedStorageSetMethod/ignore if present=] to |options|["{{SharedStorageSetMethodOptions/ignoreIfPresent}}"].
14931493
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] [=map/exists=]:
14941494
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1495-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1495+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
14961496
</div>
14971497

1498+
<div algorithm>
14981499
The <dfn constructor for="SharedStorageAppendMethod" lt="SharedStorageAppendMethod(key, value)">new SharedStorageAppendMethod(|key|, |value|, |options|)</dfn> constructor steps are:
14991500

15001501
1. Let |globalObject| be the [=current realm=]'s [=global object=].
@@ -1511,13 +1512,14 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
15111512
1. Let |environment| be |context|'s [=active window=]'s [=relevant settings object=].
15121513
1. Let |databaseMap| be the result of running [=obtain a shared storage bottle map=] given |environment| and |environment|'s [=environment settings object/origin=].
15131514
1. If |databaseMap| is failure, throw a {{TypeError}}.
1514-
1. Set |this|'s [=SharedStorageAppendMethod/key=] to |key|.
1515-
1. Set |this|'s [=SharedStorageAppendMethod/value=] to |value|.
1515+
1. Set [=this=]'s [=SharedStorageAppendMethod/key=] to |key|.
1516+
1. Set [=this=]'s [=SharedStorageAppendMethod/value=] to |value|.
15161517
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] [=map/exists=]:
15171518
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1518-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1519+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
15191520
</div>
15201521

1522+
<div algorithm>
15211523
The <dfn constructor for="SharedStorageDeleteMethod" lt="SharedStorageDeleteMethod(key)">new SharedStorageAppendMethod(|key|, |options|)</dfn> constructor steps are:
15221524

15231525
1. Let |globalObject| be the [=current realm=]'s [=global object=].
@@ -1533,12 +1535,13 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
15331535
1. Let |environment| be |context|'s [=active window=]'s [=relevant settings object=].
15341536
1. Let |databaseMap| be the result of running [=obtain a shared storage bottle map=] given |environment| and |environment|'s [=environment settings object/origin=].
15351537
1. If |databaseMap| is failure, throw a {{TypeError}}.
1536-
1. Set |this|'s [=SharedStorageDeleteMethod/key=] to |key|.
1538+
1. Set [=this=]'s [=SharedStorageDeleteMethod/key=] to |key|.
15371539
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] [=map/exists=]:
15381540
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1539-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1541+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
15401542
</div>
15411543

1544+
<div algorithm>
15421545
The <dfn constructor for="SharedStorageClearMethod" lt="SharedStorageClearMethod()">new SharedStorageClearMethod(|options|)</dfn> constructor steps are:
15431546

15441547
1. Let |globalObject| be the [=current realm=]'s [=global object=].
@@ -1555,7 +1558,7 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
15551558
1. If |databaseMap| is failure, throw a {{TypeError}}.
15561559
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] [=map/exists=]:
15571560
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1558-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1561+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
15591562
</div>
15601563

15611564
The {{SharedStorage}} Interface {#shared-storage-interface}

0 commit comments

Comments
 (0)