Commit Graph

147 Commits

Author SHA1 Message Date
Kagami Sascha Rosylight
3014b2fe59 Bug 1769290 - Part 8: Apply mozilla-js-handle-rooted-typedef against dom/canvas,crypto,fetch,gamepad,geolocation,indexedDB,ipc r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148281
2022-06-05 20:54:59 +00:00
Serge Guelton
5ff5ace97c Bug 1769311 - Cleanup dom/indexedDB headers r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D146339
2022-05-30 10:02:39 +00:00
Jan Varga
3e73e7ce93 Bug 1731960 - Move all Result extensions from QMResult.h to a dedicated file; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126324
2021-11-30 05:05:51 +00:00
Yoshi Cheng-Hao Huang
8e0a17583e Bug 1719542 - Part 4: Make calling nsTArray::SetCapacity fallible. r=platform-i18n-reviewers,dminor
Originally nsCollation::AllocateRawSortKey used an infallible nsTArray[1],
however, for IndexedDB it used a fallible nsTArray instead[2], so making
SetCapacity fallible.

[1]: https://hg.mozilla.org/mozilla-central/rev/1a74809df6b9#l3.150
[2]: https://searchfox.org/mozilla-central/rev/ff5309e67b20a9976ea762f9ec5f657da0801490/dom/indexedDB/Key.cpp#673

Differential Revision: https://phabricator.services.mozilla.com/D129378
2021-10-25 18:23:12 +00:00
Yoshi Cheng-Hao Huang
339f66b006 Bug 1719542 - Part 3: Unify IndexedDB key. r=platform-i18n-reviewers,gregtatum
For Key::EncodeLocaleString change, the test should be convered in
dom/indexedDB/test/gtest/TestKey.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D129000
2021-10-25 18:23:11 +00:00
Jan Varga
711f6a0798 Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed in dom/indexedDB; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125318
2021-09-24 13:08:30 +00:00
Tooru Fujisawa
0986662ce6 Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Jan Varga
4dd5e829fb Bug 1709067 - IDB: Remove module specific QM_TRY macros; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D114080
2021-05-03 19:44:38 +00:00
Jan de Mooij
9a3a78c514 Bug 1674777 part 5 - Change GetObjectAs* APIs to use size_t for outparam instead of uint32_t. r=sfink,sg
Note that in the IndexedDB code we pass a Span to Key::EncodeAsString where we check
for large lengths.

Differential Revision: https://phabricator.services.mozilla.com/D103679
2021-02-01 17:15:00 +00:00
Simon Giesecke
e262d1f0b8 Bug 1665347 - Do not indicate SpecialValues::Invalid could be returned on functions that never return it. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90962
2020-10-06 08:39:04 +00:00
Simon Giesecke
54a4e17a0b Bug 1665347 - Make IDBResult based on mozilla::Result. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90562
2020-10-06 08:37:59 +00:00
Sebastian Hengst
07e61ece2b Backed out 5 changesets (bug 1666219, bug 1665347) for crashing hazard task. CLOSED TREE.
Backed out changeset c261ec06a826 (bug 1665347)
Backed out changeset 212c9df41410 (bug 1665347)
Backed out changeset 435f02d9f1d7 (bug 1665347)
Backed out changeset 7b36a79247b7 (bug 1666219)
Backed out changeset af8025162523 (bug 1665347)
2020-10-01 23:17:19 +02:00
Simon Giesecke
dd4cf5dedd Bug 1665347 - Do not indicate SpecialValues::Invalid could be returned on functions that never return it. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90962
2020-10-01 15:30:36 +00:00
Simon Giesecke
9fb9c90cc0 Bug 1665347 - Make IDBResult based on mozilla::Result. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90562
2020-10-01 15:30:36 +00:00
Bogdan Tara
7bbd692ffa Backed out 5 changesets (bug 1666219, bug 1665347) for indexedDB related bustage CLOSED TREE
Backed out changeset 5cd7e2d67f91 (bug 1665347)
Backed out changeset 9159fdd05097 (bug 1665347)
Backed out changeset 64a086636738 (bug 1665347)
Backed out changeset 5ef18af381ec (bug 1666219)
Backed out changeset 3b81349a5f39 (bug 1665347)
2020-10-01 17:41:23 +03:00
Simon Giesecke
e41aa38d86 Bug 1665347 - Do not indicate SpecialValues::Invalid could be returned on functions that never return it. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90962
2020-10-01 12:04:27 +00:00
Simon Giesecke
c51f0dc8d8 Bug 1665347 - Make IDBResult based on mozilla::Result. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90562
2020-10-01 12:00:51 +00:00
Jeff Walden
1760d6f90a Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Jeff Walden
d6ec80e9ec Bug 1656411 - Move typed array, ArrayBuffer, and dataview-related functions out of jsfriendapi.h to two new headers. r=mgaudet,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D85524
2020-07-31 16:37:27 +00:00
Jan Varga
cc66b161be Bug 1651016 - Convert remaining NS_ENSURE_SUCCESS to IDB_TRY in dom/indexedDB; r=dom-workers-and-storage-reviewers,ttung,sg
Differential Revision: https://phabricator.services.mozilla.com/D84315
2020-07-24 11:49:27 +00:00
Simon Giesecke
0f3442d887 Bug 1652002 - Remove ambiguity between mozilla::dom::indexedDB::Exception and mozilla::dom::Exception. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D83483
2020-07-15 12:45:37 +00:00
Simon Giesecke
862f1f2c7a Bug 1650765 - Perform optimization for strings encoded as single-bytes only. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D82355
2020-07-07 14:06:00 +00:00
Simon Giesecke
1779732981 Bug 1650765 - Iterate over raw ranges in EncodeAsString. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D82354
2020-07-07 12:18:25 +00:00
Mihai Alexandru Michis
8424a5d381 Backed out 2 changesets (bug 1650765) for causing failures in EncodeAsString.
CLOSED TREE

Backed out changeset 784be0839695 (bug 1650765)
Backed out changeset 05f1ba04a8f4 (bug 1650765)
2020-07-07 15:15:57 +03:00
Simon Giesecke
1f12b84059 Bug 1650765 - Perform optimization for strings encoded as single-bytes only. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D82355
2020-07-07 11:13:04 +00:00
Simon Giesecke
af19a5f7d8 Bug 1650765 - Iterate over raw ranges in EncodeAsString. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D82354
2020-07-07 10:59:20 +00:00
Simon Giesecke
0f5aea8dcc Bug 1644379 - Change DecodeString to return string by value. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D78881
2020-06-30 10:03:11 +00:00
Simon Giesecke
89c937000e Bug 1644379 - Move ConvertArrayValueToKey to cpp file. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D78880
2020-06-30 10:02:53 +00:00
Simon Giesecke
182f61faf1 Bug 1644379 - Change ToLocaleAwareKey to return new Key by value. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D78879
2020-06-30 14:18:15 +00:00
Simon Giesecke
97b2b32895 Bug 1644379 - Change IDBResult(Base) to contain the ErrorResult. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D78707
2020-06-30 11:17:40 +00:00
Narcis Beleuzu
dfce2aabe3 Backed out 6 changesets (bug 1644379) for bustages on IDBResult.h . CLOSED TREE
Backed out changeset df76fe2ab8bf (bug 1644379)
Backed out changeset a22f8c2a1fe7 (bug 1644379)
Backed out changeset 1244dc147bb7 (bug 1644379)
Backed out changeset 88afa250d734 (bug 1644379)
Backed out changeset e90b2d69b818 (bug 1644379)
Backed out changeset c9690f97b893 (bug 1644379)
2020-06-30 13:54:22 +03:00
Simon Giesecke
ce0e47d951 Bug 1644379 - Change IDBResult(Base) to contain the ErrorResult. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D78707
2020-06-30 10:01:03 +00:00
Simon Giesecke
99823d5a76 Bug 1641598 - Fix defect in Key::LengthOfEncodedBinary. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D78696
2020-06-29 14:36:51 +00:00
Simon Giesecke
c8c750a54f Bug 1623278 - Use mozilla::Span instead of pointer/length pair in Key. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D72632
2020-06-16 14:25:04 +00:00
Simon Giesecke
9d45a857b2 Bug 1633446 - Fix handling of wrapped ArrayBuffer objects. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D72884
2020-05-07 11:26:19 +00:00
Simon Giesecke
6ff72d4e84 Bug 1618542 - Made possibly large memory allocations fallible. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D69038
2020-04-21 14:34:19 +00:00
Simon Giesecke
f8051e242c Bug 1617170 - Encapsulate StructuredCloneReadInfo members. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D64078
2020-03-11 17:20:05 +00:00
Sylvestre Ledru
3a389404c5 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217
2020-01-18 13:48:34 +00:00
Dorel Luca
8cc61e1d4b Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
8cc3e9bf3f Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

Differential Revision: https://phabricator.services.mozilla.com/D58217
2020-01-18 13:16:39 +00:00
Jeff Walden
5c07885dcf Bug 1602882 - Move array operations to a new js/Array.h header. r=sfink,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D56595
2019-12-11 06:17:44 +00:00
Simon Giesecke
27faf9c05c Bug 1596129 - Use const where easily possible. r=dom-workers-and-storage-reviewers,ytausky
Depends on D52875

Differential Revision: https://phabricator.services.mozilla.com/D52876
2019-11-29 08:50:37 +00:00
Simon Giesecke
2c1cc1c111 Bug 1168606 - Apply renamings suggested for Cursor::*Key members and related identifiers. r=ytausky,asuth
Differential Revision: https://phabricator.services.mozilla.com/D43249
2019-09-18 06:41:35 +00:00
Simon Giesecke
316e2bc649 Bug 1168606 - Inline Key::Assert function to make effective use of MOZ_ASSERT diagnostics. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D43039
2019-09-18 06:41:23 +00:00
Simon Giesecke
f55eb600fd Bug 1565515 - Removed duplication between LengthOfEncodedBinary and CalcDecodedStringySize r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38173
2019-07-30 14:52:18 +00:00
Simon Giesecke
35097708cc Bug 1565515 - Define and use type aliases EncodedDataType r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D38172
2019-07-30 14:52:04 +00:00
Simon Giesecke
489912781c Bug 1565515 - Reduced code duplication in DecodeString/DecodeBinary r=ttung,asuth
EncodeString and EncodeBinary already use a common backend EncodeAsString,
the same should be done in decoding, as the encoding of a binary is
a special case of the encoding of a string.

Differential Revision: https://phabricator.services.mozilla.com/D38076
2019-07-30 14:51:40 +00:00
Simon Giesecke
10ae90f3d4 Bug 1565515 - Fixed spelling mistake in comment r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D37851
2019-07-30 14:49:31 +00:00
Simon Giesecke
46d12c5337 Bug 1565515 - Updated comment r=asuth,ttung
The comment referenced the former 3 prefix used for strings, but this is
no longer correct for strings (which now use a 0x30) prefix, and the
function has been generalized to also work for binaries, and got
a parameter aType specifying the prefix. Updated the comment accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D37850
2019-07-30 14:49:12 +00:00
Simon Giesecke
f035961bd5 Bug 1565515 - DecodeBinary violates contract for 0-sized binary r=asuth,ttung
Differential Revision: https://phabricator.services.mozilla.com/D37849
2019-07-30 14:48:53 +00:00