Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editorial: fix Script.InternalId type #583

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6402,6 +6402,19 @@ the ECMAScript runtime. The handle is only valid in a specific [=Realm=].
Each ECMAScript [=Realm=] has a corresponding <dfn>handle object map</dfn>. This is a
strong [=/map=] from handle ids to their corresponding objects.

#### The script.InternalId Type #### {#type-script-InternalId}

[=Remote end definition=] and [=local end definition=]

<pre class="cddl remote-cddl local-cddl">
script.InternalId = text;
</pre>

The <code>script.InternalId</code> type represents the id of
a previously serialized <code>script.RemoteValue</code> during
[=serialize as a remote value|serialization=].


#### The script.LocalValue Type #### {#type-script-LocalValue}

[=Remote end definition=]
Expand Down Expand Up @@ -7149,8 +7162,6 @@ script.RemoteValue = (
script.WindowProxyRemoteValue
)

script.InternalId = js-uint;

script.ListRemoteValue = [*script.RemoteValue];

script.MappingRemoteValue = [*[(script.RemoteValue / text), script.RemoteValue]];
Expand Down Expand Up @@ -7395,10 +7406,10 @@ To <dfn>set internal ids if needed</dfn> given |serialization internal map|,
1. If |previously serialized remote value| does not have a field
<code>internalId</code>, run the following steps:

1. Let |internal id| be a unique across the <code>internalId</code> fields of
the values of |serialization internal map| integer.
1. Let |internal id| be the string representation of a [[!RFC4122|UUID]]
based on truly random, or pseudo-random numbers.

1. Set the <code>internalId</code> field of
1. Set the <code>internalId</code> field of
|previously serialized remote value| to |internal id|.

1. Set the <code>internalId</code> field of |remote value| to a field
Expand Down