Skip to content

Commit

Permalink
Return "no such frame" error instead "invalid argument"
Browse files Browse the repository at this point in the history
  • Loading branch information
lutien committed Jan 21, 2025
1 parent 01ae7be commit da7ada3
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,22 @@ To <dfn>get top-level traversables</dfn> given a [=/list=] of [=/navigables=] |n

</div>

<div algorithm>

To <dfn>get valid navigables by ids</dfn> given a [=/list=] of context ids |navigable ids|:

1. Let |result| be an empty [=/set=].

1. For each |navigable id| in |navigable ids|:

1. Let |navigable| be the result of [=trying=] to [=get a navigable=] with |navigable id|.

1. [=set/Append=] |navigable| to |result|.

1. Return [=success=] with data |result|.

</div>

<div algorithm> To <dfn export>emit an event</dfn> given |session|, and |body|:

1. [=Assert=]: |body| has [=map/size=] 2 and [=map/contains=] "<code>method</code>"
Expand Down Expand Up @@ -1982,11 +1998,7 @@ The [=remote end steps=] with |session| and |command parameters| are:

1. If |input context ids| is not empty:

1. Let |navigables| be [=get navigables by ids=] with |input context ids|.

1. If [=list/size=] of |navigables| does not equal [=list/size=] of |input context ids|:

1. Return [=error=] with [=error code=] [=invalid argument=].
1. Let |navigables| be the result of [=trying=] to [=get valid navigables by ids=] with |input context ids|.

1. Set |subscription navigables| be [=get top-level traversables=] with |navigables|.

Expand Down Expand Up @@ -2102,11 +2114,7 @@ The [=remote end steps=] with |session| and |command parameters| are:

1. If |input context ids| is not empty:

1. Let |navigables| be [=get navigables by ids=] with |input context ids|.

1. If [=list/size=] of |navigables| does not equal [=list/size=] of |input context ids|:

1. Return [=error=] with [=error code=] [=invalid argument=].
1. Let |navigables| be the result of [=trying=] to [=get valid navigables by ids=] with |input context ids|.

1. Set |top-level traversables| be [=get top-level traversables=] with |navigables|.

Expand Down

0 comments on commit da7ada3

Please sign in to comment.