Skip to content

Commit 68f2737

Browse files
Make transactions inactive during clone
1 parent 98099f2 commit 68f2737

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

index.bs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ To <dfn>add or put</dfn> with |handle|, |value|, |key|, and |no-overwrite flag|,
29842984

29852985
1. Let |targetRealm| be a user-agent defined [=Realm=].
29862986

2987-
1. Let |clone| be a [=clone=] of |value| in |targetRealm|.
2987+
1. Let |clone| be a [=clone=] of |value| in |targetRealm| during |transaction|.
29882988
Rethrow any exceptions.
29892989

29902990
<details class=note>
@@ -4681,7 +4681,7 @@ invoked, must run these steps:
46814681

46824682
1. Let |targetRealm| be a user-agent defined [=Realm=].
46834683

4684-
1. Let |clone| be a [=clone=] of |value| in |targetRealm|.
4684+
1. Let |clone| be a [=clone=] of |value| in |targetRealm| during |transaction|.
46854685
Rethrow any exceptions.
46864686

46874687
<details class=note>
@@ -5529,8 +5529,7 @@ To <dfn>abort an upgrade transaction</dfn> with |transaction|, run these steps:
55295529

55305530
<div class=algorithm>
55315531

5532-
To <dfn>fire a success event</dfn> at a |request|,
5533-
the implementation must run these steps:
5532+
To <dfn>fire a success event</dfn> at a |request|, run these steps:
55345533

55355534
1. Let |event| be the result of [=creating an event=] using {{Event}}.
55365535

@@ -5569,8 +5568,7 @@ the implementation must run these steps:
55695568

55705569
<div class=algorithm>
55715570

5572-
To <dfn>fire an error event</dfn> at a |request|,
5573-
the implementation must run these steps:
5571+
To <dfn>fire an error event</dfn> at a |request|, run these steps:
55745572

55755573
1. Let |event| be the result of [=creating an event=] using {{Event}}.
55765574

@@ -5622,13 +5620,23 @@ the implementation must run these steps:
56225620

56235621
<div class=algorithm>
56245622

5625-
To make a <dfn>clone</dfn> of |value| in |targetRealm|,
5626-
the implementation must run these steps:
5623+
To make a <dfn>clone</dfn> of |value| in |targetRealm| during |transaction|,
5624+
run these steps:
5625+
5626+
1. [=/Assert=]: |transaction|'s [=transaction/state=] is [=transaction/active=].
5627+
5628+
1. Set |transaction|'s [=transaction/state=] to [=transaction/inactive=].
5629+
5630+
<aside class=note>
5631+
The [=/transaction=] is made [=transaction/inactive=] so that getters or other side effects triggered by the cloning operation are unable to make additional requests against the transaction.
5632+
</aside>
56275633

56285634
1. Let |serialized| be [=?=] <a abstract-op>StructuredSerializeForStorage</a>(|value|).
56295635

56305636
1. Let |clone| be [=?=] <a abstract-op>StructuredDeserialize</a>(|serialized|, |targetRealm|).
56315637

5638+
1. Set |transaction|'s [=transaction/state=] to [=transaction/active=].
5639+
56325640
1. Return |clone|.
56335641

56345642
</div>

0 commit comments

Comments
 (0)