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 c75a0d3 commit 389cd1c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ To <dfn>get related navigables</dfn> given an [=script/settings object=]

<div algorithm>

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

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

Expand All @@ -1152,7 +1152,10 @@ To <dfn>get navigables by ids</dfn> given a [=/list=] of context ids |navigable
1. Let |navigable| be the [=/navigable=] with id |navigable id|
if such [=/navigable=] exists, and null otherwise.

1. [=set/Append=] |navigable| to |result| if |navigable| is not null.
1. If |navigable| is not null, [=set/append=] |navigable| to |result|.

1. Otherwise, if |validate navigables| is true return [=error=] with
[=error code=] [=no such frame=].

1. Return |result|.

Expand Down Expand Up @@ -1982,11 +1985,9 @@ 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. Let |validate navigables| be true.

1. Return [=error=] with [=error code=] [=invalid argument=].
1. Let |navigables| be [=get navigables by ids=] with |input context ids| and |validate navigables|.

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

Expand Down Expand Up @@ -2102,11 +2103,9 @@ 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. Let |validate navigables| be true.

1. Return [=error=] with [=error code=] [=invalid argument=].
1. Let |navigables| be [=get navigables by ids=] with |input context ids| and |validate navigables|.

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

Expand Down

0 comments on commit 389cd1c

Please sign in to comment.