Skip to content

Commit 7d425a9

Browse files
Disallow proxies during key conversion
All engines disallow using proxies when specifying keys. Update spec text to reflect this. Closes #309
1 parent 98099f2 commit 7d425a9

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

index.bs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,33 +38,32 @@ spec: ecma262; urlPrefix: https://tc39.github.io/ecma262/
3838
text: !
3939
text: ?
4040
text: abrupt completion; url: sec-completion-record-specification-type
41-
text: ReturnIfAbrupt; url: sec-returnifabrupt
42-
text: IdentifierName; url: prod-IdentifierName
43-
text: Type; url: sec-ecmascript-data-types-and-values
44-
text: HasOwnProperty; url: sec-hasownproperty
45-
text: Get; url: sec-get-o-p
41+
text: Array; url: sec-array-objects
42+
text: array exotic object; url: array-exotic-objects
43+
text: Array.prototype.sort; url: sec-array.prototype.sort
44+
text: ArrayBuffer; url: sec-arraybuffer-objects
4645
text: CreateDataProperty; url: sec-createdataproperty
47-
text: ToLength; url: sec-tolength
48-
text: ToString; url: sec-tostring
49-
text: IsArray; url: sec-isarray
50-
text: String; url: sec-terms-and-definitions-string-type
51-
text: Number; url: sec-terms-and-definitions-number-type
52-
text: RegExp; url: sec-regexp-regular-expression-objects
46+
text: current Realm; url: current-realm
5347
text: Date; url: sec-date-objects
48+
text: Get; url: sec-get-o-p
49+
text: HasOwnProperty; url: sec-hasownproperty
50+
text: IdentifierName; url: prod-IdentifierName
51+
text: Number; url: sec-terms-and-definitions-number-type
5452
text: Object; url: sec-object-objects
55-
text: TypeError; url: sec-native-error-types-used-in-this-standard-typeerror
56-
text: Array; url: sec-array-objects
57-
text: ArrayBuffer; url: sec-arraybuffer-objects
58-
text: Uint8Array; url: sec-typedarray-objects
59-
text: Promise; url: sec-promise-objects
6053
text: Realm; url: realm
61-
text: current Realm; url: current-realm
62-
text: Array.prototype.sort; url: sec-array.prototype.sort
6354
text: Record; url: sec-list-and-record-specification-type
55+
text: RegExp; url: sec-regexp-regular-expression-objects
56+
text: ReturnIfAbrupt; url: sec-returnifabrupt
57+
text: String; url: sec-terms-and-definitions-string-type
58+
text: ToLength; url: sec-tolength
59+
text: ToString; url: sec-tostring
60+
text: Type; url: sec-ecmascript-data-types-and-values
61+
text: TypeError; url: sec-native-error-types-used-in-this-standard-typeerror
62+
text: Uint8Array; url: sec-typedarray-objects
6463
spec: webidl; urlPrefix: https://heycam.github.io/webidl/
6564
type: dfn
66-
text: sequence<DOMString>; url: idl-sequence
6765
text: sequence<any>; url: idl-sequence
66+
text: sequence<DOMString>; url: idl-sequence
6867
</pre>
6968

7069
<style>
@@ -2364,14 +2363,14 @@ when invoked, must run these steps:
23642363
1. Let |origin| be the [=/origin=] of the global scope used to access **this**.
23652364

23662365
1. If |origin| is an [=opaque origin=],
2367-
then return a new promise rejected with a "{{SecurityError}}" {{DOMException}}.
2366+
then return [=/a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
23682367

2369-
1. Let |p| be a new promise.
2368+
1. Let |p| be [=/a new promise=].
23702369

23712370
1. Run these steps [=in parallel=]:
23722371

23732372
1. Let |databases| be the [=/set=] of [=databases=] in |origin|.
2374-
If this cannot be determined for any reason, then reject |p| with
2373+
If this cannot be determined for any reason, then [=/reject=] |p| with
23752374
an appropriate error (e.g. an "{{UnknownError}}" {{DOMException}})
23762375
and terminate these steps.
23772376

@@ -2384,7 +2383,7 @@ when invoked, must run these steps:
23842383
1. Set |info|'s {{IDBDatabaseInfo/version}} dictionary member to |db|'s [=database/version=].
23852384
1. [=list/Append=] |info| to |result|.
23862385

2387-
1. Resolve |p| with |result|.
2386+
1. [=/Resolve=] |p| with |result|.
23882387

23892388
1. Return |p|.
23902389

@@ -6503,7 +6502,7 @@ steps may throw an exception.
65036502
*binary* and [=key/value=] |bytes|.
65046503

65056504
<!-- Array -->
6506-
: If [=IsArray=](|input|)
6505+
: If |input| is an [=/Array exotic object=]
65076506
::
65086507
1. Let |len| be [=?=] [=ToLength=]( [=?=] [=Get=](|input|,
65096508
"`length`")).
@@ -6549,7 +6548,7 @@ To <dfn>convert a value to a multiEntry key</dfn> with an ECMAScript value |inpu
65496548
The result of these steps is a [=/key=] or invalid, or the
65506549
steps may throw an exception.
65516550

6552-
1. If [=IsArray=](|input|), then:
6551+
1. If |input| is an [=/Array exotic object=], then:
65536552

65546553
1. Let |len| be [=?=] ToLength( [=?=] [=Get=](|input|, "`length`")).
65556554

@@ -6815,6 +6814,7 @@ For the revision history of the second edition, see [that document's Revision Hi
68156814
* Added {{IDBCursor/request}} attribute. ([Issue #255](https://github.com/w3c/IndexedDB/issues/255))
68166815
* Removed handling for nonstandard `lastModifiedDate` property of {{File}} objects. ([Issue #215](https://github.com/w3c/IndexedDB/issues/215))
68176816
* Remove escaping {{IDBKeyRange/includes()}} method. ([Issue #294](https://github.com/w3c/IndexedDB/issues/294))
6817+
* Restrict array keys to [=/Array exotic objects=] (i.e. disallow proxies). ([Issue #309](https://github.com/w3c/IndexedDB/issues/309])
68186818

68196819
<!-- ============================================================ -->
68206820
# Acknowledgements # {#acknowledgements}

0 commit comments

Comments
 (0)