Skip to content

Commit 48acd25

Browse files
authored
Merge pull request #227 from WICG/yao-allow-navigator
[spec] During addModule(), switch to allow `navigator` but disallow `navigator.locks`
2 parents a1bffbb + 1cb8bcb commit 48acd25

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

spec.bs

+14-2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ spec: web-locks; urlPrefix: https://w3c.github.io/web-locks/
103103
text: lock manager; url: lock-manager
104104
text: obtain a lock manager; url: obtain-a-lock-manager
105105
text: request a lock; url: request-a-lock
106+
text: locks getter steps; url: dom-navigatorlocks-locks
106107
spec: ecma; urlPrefix: https://tc39.es/ecma262/
107108
type: dfn
108109
text: call; url: sec-call
@@ -927,8 +928,7 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
927928
<div algorithm>
928929
The <dfn attribute for=SharedStorageWorkletGlobalScope>navigator</dfn> [=getter steps=] are:
929930

930-
1. If [=this=]'s [=addModule success=] is true, return [=this=]'s [=SharedStorageWorkletGlobalScope/navigator instance=].
931-
1. Otherwise, throw a {{TypeError}}.
931+
1. Return [=this=]'s [=SharedStorageWorkletGlobalScope/navigator instance=].
932932
</div>
933933

934934
<div algorithm="privateAggregation getter">
@@ -2391,6 +2391,18 @@ interface Lock {};
23912391

23922392
Add the following sentence at the end of the paragraph that defines [=lock manager=]: "Additionally, each user agent includes one [=shared storage lock managers map=] for Web Locks API's integration with the Shared Storage API."
23932393

2394+
2395+
## Monkey Patch for locks getter steps ## {#monkey-patch-for-locks-getter-steps}
2396+
2397+
The [=locks getter steps=] should be updated to the following setps:
2398+
2399+
<div algorithm='monkey-patch-locks-getter-steps'>
2400+
1. Let |globalObject| be the [=current realm=]'s [=global object=].
2401+
1. If |globalObject| is a {{SharedStorageWorkletGlobalScope}}:
2402+
1. If the |globalObject|'s [=SharedStorageWorkletGlobalScope/addModule success=] is false, then throw a {{TypeError}}.
2403+
1. Return [=/this=]'s [=/relevant settings object=]'s {{LockManager}} object
2404+
</div>
2405+
23942406
## Monkey Patch for the "obtain a lock manager" algorithm ## {#monkey-patch-for-the-obtain-a-lock-manager-algorithm}
23952407

23962408
The [=obtain a lock manager=] algorithm should be prepended with the following steps:

0 commit comments

Comments
 (0)