Skip to content

Commit 2cf0288

Browse files
committed
Address review feedback
1 parent 9254a23 commit 2cf0288

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

storage-access.bs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ When invoked on {{Document}} |doc|, the <dfn export method for=Document><code>ha
176176
1. If |doc|'s [=Document/origin=] is [=same origin=] with the [=top-level origin=] of |doc|'s [=relevant settings object=], [=/resolve=] |p| with true and return |p|.
177177
1. Let |key| be the result of [=generate a partitioned storage key|generating a partitioned storage key=] from |doc|.
178178
1. If |key| is failure, [=resolve=] |p| with false and return |p|.
179-
1. [=Resolve=] or [=reject=] |p| based on the result of running [=determine if a site has storage access=] with |key| and |doc|.
179+
1. [=Resolve=] |p| with the result of running [=determine if a site has storage access=] with |key| and |doc|.
180180
1. Return |p|.
181181

182182
ISSUE: Shouldn't step 8 be [=same site=]?
@@ -208,9 +208,12 @@ When invoked on {{Document}} |doc|, the <dfn export method for=Document><code>re
208208
1. [=Determine the storage access policy=] with |key|, |doc| and |hasAccess|.
209209
1. [=Queue a global task=] on the [=permissions task source=] given |global| to
210210
1. Set |flag set|'s [=has storage access flag=].
211-
1. Resolve or reject |p| based on the result of |hasAccess|.
211+
1. If |hasAccess| is true, resolve |p|.
212+
1. Reject |p| with a "{{NotAllowedError}}" {{DOMException}}.
212213
1. Return |p|.
213214

215+
ISSUE(privacycg/storage-access#144): We shouldn't use the permissions task source here.
216+
214217
ISSUE: Shouldn't step 9 be [=same site=]?
215218

216219
<h4 id="ua-policy">User Agent storage access policies</h4>
@@ -231,7 +234,7 @@ To <dfn type="abstract-op">determine the storage access policy</dfn> for [=parti
231234
1. Let |implicitly granted| and |implicitly denied| (each a [=boolean=]) be the result of running an [=implementation-defined=] set of steps to determine if |key|'s [=partitioned storage key/embedded origin=]'s request for storage access on |key|'s [=partitioned storage key/top-level site=] should be granted or denied without prompting the user.
232235
1. Let |global| be |doc|'s [=relevant global object=].
233236
1. If |implicitly granted| is true, [=queue a global task=] on the [=permissions task source=] given |global| to [=/resolve=] |p|, and return.
234-
1. If |implicitly denied| is true, [=queue a global task=] on the [=permissions task source=] given |global| to [=/reject=] |p| with a "{{NotAllowedError}}" {{DOMException}}, and return |p|.
237+
1. If |implicitly denied| is true, [=queue a global task=] on the [=permissions task source=] given |global| to [=/reject=] |p| with a "{{NotAllowedError}}" {{DOMException}}, and return.
235238
1. Let |permissionState| be the result of [=requesting permission to use=] "<a permission><code>storage-access</code></a>".
236239
1. If |permissionState| is "granted", [=queue a global task=] on the [=permissions task source=] given |global| to [=/resolve=] |p|, and return.
237240
1. Unset |flag set|'s [=has storage access flag=].
@@ -287,7 +290,7 @@ The Storage Access API defines a [=powerful feature=] identified by the [=powerf
287290
</dd>
288291
<dt>[=powerful feature/permission key type=]</dt>
289292
<dd>
290-
A [=permission key=] of the "<a permission><code>storage-access</code></a>" feature has the type ([=site=], [=/origin=]).
293+
A [=permission key=] of the "<a permission><code>storage-access</code></a>" feature is a [=tuple=] consisting of a [=site=] <dfn for="permission key">key site</dfn> and an [=/origin=] <dfn for="permission key">key origin</dfn>.
291294
</dd>
292295
<dt>[=powerful feature/permission key generation algorithm=]</dt>
293296
<dd>
@@ -301,8 +304,8 @@ The Storage Access API defines a [=powerful feature=] identified by the [=powerf
301304
<dd>
302305
To compare the [=permission keys=] |key1| and |key2| for the "<a permission><code>storage-access</code></a>" feature, run the following steps:
303306

304-
1. If |key1|[0] is not [=same site=] with |key2|[0], return false.
305-
1. If |key1|[1] is not [=same origin=] with |key2|[1], return false.
307+
1. If |key1|'s [=permission key/key site=] is not [=same site=] with |key2|'s [=permission key/key site=], return false.
308+
1. If |key1|'s [=permission key/key origin=] is not [=same origin=] with |key2|'s [=permission key/key origin=], return false.
306309
1. Return true.
307310
</dd>
308311
</dl>

0 commit comments

Comments
 (0)