Skip to content

Commit d94d9e8

Browse files
authored
Spec: clean up temporary variables (#127)
These variables were used for indexing into global maps, but are not necessary.
1 parent d464c03 commit d94d9e8

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

spec.bs

+16-23
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,7 @@ enableDebugMode(optional PADebugModeOptions options)</dfn> method steps are:
194194
1. Let |scopingDetails| be [=this=]'s [=PrivateAggregation/scoping details=].
195195
1. Let |debugScope| be the result of running |scopingDetails|' [=scoping
196196
details/get debug scope steps=].
197-
1. Let |debugScopeMap| be the [=debug scope map=].
198-
1. If |debugScopeMap|[|debugScope|] [=map/exists=], [=exception/throw=] a
197+
1. If [=debug scope map=][|debugScope|] [=map/exists=], [=exception/throw=] a
199198
"{{DataError}}" {{DOMException}}.
200199

201200
Note: This would occur if `enableDebugMode()` has already been run for this
@@ -216,7 +215,7 @@ enableDebugMode(optional PADebugModeOptions options)</dfn> method steps are:
216215

217216
Note: This allows the user agent to make debug mode unavailable globally or
218217
just for certain callers.
219-
1. [=map/Set=] |debugScopeMap|[|debugScope|] to |debugDetails|.
218+
1. [=map/Set=] [=debug scope map=][|debugScope|] to |debugDetails|.
220219

221220
Issue: Ensure errors are of an appropriate type, e.g. {{InvalidAccessError}} is
222221
deprecated.
@@ -471,23 +470,21 @@ To <dfn algorithm export>append an entry to the contribution cache</dfn> given a
471470

472471
To <dfn algorithm export>get a debug details</dfn> given a [=debug scope=]
473472
|debugScope|, perform the following steps. They return a [=debug details=].
474-
1. Let |debugScopeMap| be the [=debug scope map=].
475-
1. If |debugScopeMap|[|debugScope|] [=map/exists=], return
476-
|debugScopeMap|[|debugScope|].
473+
1. If [=debug scope map=][|debugScope|] [=map/exists=], return
474+
[=debug scope map=][|debugScope|].
477475
1. Otherwise, return a new [=debug details=].
478476

479477
To <dfn algorithm export>mark a debug scope complete</dfn> given a [=debug
480478
scope=] |debugScope| and an optional [=debug details=] or null
481479
|debugDetailsOverride| (default null):
482480
1. Let |debugDetails| be |debugDetailsOverride|.
483-
1. Let |debugScopeMap| be the [=debug scope map=].
484-
1. If |debugScopeMap|[|debugScope|] [=map/exists=]:
481+
1. If [=debug scope map=][|debugScope|] [=map/exists=]:
485482
1. [=Assert=]: |debugDetailsOverride| is null.
486483

487484
Note: The override can be provided if the debug details have not been
488485
set otherwise.
489-
1. Set |debugDetails| to |debugScopeMap|[|debugScope|].
490-
1. [=map/Remove=] |debugScopeMap|[|debugScope|].
486+
1. Set |debugDetails| to [=debug scope map=][|debugScope|].
487+
1. [=map/Remove=] [=debug scope map=][|debugScope|].
491488
1. If |debugDetails|'s [=debug details/key=] is not null, [=assert=]:
492489
|debugDetails|'s [=debug details/enabled=] is true.
493490
1. If |debugDetails| is null, set |debugDetails| to a new [=debug details=].
@@ -512,16 +509,14 @@ a [=batching scope=] |batchingScope|, an [=origin=] |reportingOrigin|, a
512509

513510
1. [=list/Append=] |entry| to |batchEntries|.
514511
1. Let |aggregationCoordinator| be the [=default aggregation coordinator=].
515-
1. Let |aggregationCoordinatorMap| be the [=aggregation coordinator map=].
516-
1. If |aggregationCoordinatorMap|[|batchingScope|] [=map/exists=]:
517-
1. Set |aggregationCoordinator| to
518-
|aggregationCoordinatorMap|[|batchingScope|].
519-
1. [=map/Remove=] |aggregationCoordinatorMap|[|batchingScope|].
512+
1. If [=aggregation coordinator map=][|batchingScope|] [=map/exists=]:
513+
1. Set |aggregationCoordinator| to [=aggregation coordinator
514+
map=][|batchingScope|].
515+
1. [=map/Remove=] [=aggregation coordinator map=][|batchingScope|].
520516
1. Let |contextId| be null.
521-
1. Let |contextIdMap| be the [=context ID map=].
522-
1. If |contextIdMap|[|batchingScope|] [=map/exists=]:
523-
1. Set |contextId| to |contextIdMap|[|batchingScope|].
524-
1. [=map/Remove=] |contextIdMap|[|batchingScope|].
517+
1. If [=context ID map=][|batchingScope|] [=map/exists=]:
518+
1. Set |contextId| to [=context ID map=][|batchingScope|].
519+
1. [=map/Remove=] [=context ID map=][|batchingScope|].
525520
1. Otherwise, [=assert=]: |timeout| is null.
526521

527522
Note: Timeouts can only be used for deterministic reports.
@@ -564,8 +559,7 @@ To <dfn export>set the aggregation coordinator for a batching scope</dfn> given
564559
an [=origin=] |origin| and a [=batching scope=] |batchingScope|:
565560

566561
1. [=Assert=]: |origin| is an [=aggregation coordinator=].
567-
1. Let |aggregationCoordinatorMap| be the [=aggregation coordinator map=].
568-
1. [=map/Set=] |aggregationCoordinatorMap|[|batchingScope|] to |origin|.
562+
1. [=map/Set=] [=aggregation coordinator map=][|batchingScope|] to |origin|.
569563

570564
</div>
571565

@@ -577,8 +571,7 @@ To <dfn algorithm export>set the context ID for a batching scope</dfn> given
577571
a [=string=] |contextId| and a [=batching scope=] |batchingScope|:
578572

579573
1. [=Assert=]: |contextId|'s [=string/length=] is not larger than 64.
580-
1. Let |contextIdMap| be the [=context ID map=].
581-
1. [=map/Set=] |contextIdMap|[|batchingScope|] to |contextId|.
574+
1. [=map/Set=] [=context ID map=][|batchingScope|] to |contextId|.
582575

583576
Scheduling reports {#scheduling-reports}
584577
----------------------------------------

0 commit comments

Comments
 (0)