Skip to content

Commit

Permalink
Run parts of the revoke() function appropriately in parallel.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyasskin committed Sep 21, 2017
1 parent dcc4559 commit db5f8d3
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ partial interface Permissions {
</xmp>

When the <dfn for='Permissions' method>revoke(|permissionDesc|)</dfn> method is
invoked, the UA must return <a>a new promise</a> |promise| and run the following
steps <a>in parallel</a>:

Issue: Rearrange this to avoid converting ECMAScript objects to IDL and calling
query() in parallel.
invoked, the UA MUST run the following algorithm, passing the parameter
|permissionDesc|:

<ol class="algorithm">
1. Let |rootDesc| be the object |permissionDesc| refers to, [=converted to an
Expand All @@ -40,14 +37,19 @@ query() in parallel.
to an IDL value=] of <code>|rootDesc|.{{PermissionDescriptor/name}}</code>'s
[=permission descriptor type=]. If this throws an exception, return [=a
promise rejected with=] that exception and abort these steps.
1. The UA now has [=new information about the user's intent|new
information that the user intends=] to revoke permission to use the
feature described by |typedDescriptor|.
1. If any tasks run due to <a
href="https://w3c.github.io/permissions/#reacting-to-revocation">Reacting to
users revoking permission</a>, wait for them to finish.
1. <a>Resolve</a> |promise| with the result of <code><a idl for="Permissions"
>query(|permissionDesc|)</a></code>.
1. Return [=a new promise=] |promise| and run the following steps [=in parallel=]:
1. The UA now has [=new information about the user's intent|new
information that the user intends=] to revoke permission to use the
feature described by |typedDescriptor|.
1. If any tasks run due to <a
href="https://w3c.github.io/permissions/#reacting-to-revocation">Reacting to
users revoking permission</a>, wait for them to finish.
1. [=Queue a task=] to [=resolve=] |promise| with the result of
<code><a idl
for="Permissions">query(|permissionDesc|)</a></code>.

Issue: This should pass |typedDescriptor| directly into the
parallel part of query().

</ol>

Expand Down

0 comments on commit db5f8d3

Please sign in to comment.