Commit Graph

90 Commits

Author SHA1 Message Date
Simon Giesecke
6d8be8c785 Bug 1623278 - Make transaction actors refcounted. r=dom-workers-and-storage-reviewers,nika,janv
Differential Revision: https://phabricator.services.mozilla.com/D71933
2020-05-06 12:20:32 +00:00
Chris Peterson
843c954b43 Bug 1631684 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/indexedDB. r=dom-workers-and-storage-reviewers,sg
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Differential Revision: https://phabricator.services.mozilla.com/D71713
2020-04-23 01:49:16 +00:00
Dorel Luca
41c3ea3ee8 acked out changeset 6bbecc3020b7 (bug 1631684) for build bustage in bindings/IDBObjectStoreBinding.cpp. CLOSED TREE 2020-04-22 08:41:47 +03:00
Chris Peterson
0aeb2db4f6 Bug 1631684 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/indexedDB. r=dom-workers-and-storage-reviewers,sg
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Differential Revision: https://phabricator.services.mozilla.com/D71713
2020-04-22 05:22:44 +00:00
Simon Giesecke
18c7f261c4 Bug 1623278 - Use SafeRefPtr for IDBTransaction. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D67287
2020-04-21 14:32:51 +00:00
Simon Giesecke
da859a31b2 Bug 1623278 - Use SafeRefPtr for IDBFactory. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D66972

--HG--
extra : moz-landing-system : lando
2020-04-01 09:54:43 +00:00
Simon Giesecke
02753c9665 Bug 1597954 - Switch indexedDB to use InitializedOnce from mfbt. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D65710

--HG--
extra : moz-landing-system : lando
2020-04-01 09:53:39 +00:00
Simon Giesecke
58d0171406 Bug 1620632 - Ensure nsTArray_Impl only declares a copy-constructor/assignment operator if E is copy-constructible. r=froydnj
To correctly implement this, it must be known on instantiation whether E is
copy-constructible, which is not the case if only a forward declaration is
available. This can be resolved either by making sure a full definition of E is
available, which is preferable. But in cases where this is not (easily) possible,
the information can be explicitly provided by the MOZ_DECLARE_COPY_CONSTRUCTIBLE
and MOZ_DECLARE_NON_COPY_CONSTRUCTIBLE macros. In particular, declarations for
IPDL-declared types are added to nsTArray.h itself, like it was already done
for MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR.

Differential Revision: https://phabricator.services.mozilla.com/D66244

--HG--
extra : moz-landing-system : lando
2020-03-20 17:13:51 +00:00
Simon Giesecke
7e9a7de895 Bug 1620632 - Rename confusingly named types/macros for relocation handling of nsTArray. r=froydnj
Specifically, this renames
* nsTArray_CopyChooser to nsTArray_RelocationStrategy
* the Copy template argument of nsTArray_base to RelocationStrategy
* nsTArray_CopyWithConstructors to nsTArray_RelocateUsingMoveConstructor
* nsTArray_CopyWithMemutils to nsTArray_RelocateUsingMemutils
* DECLARE_USE_COPY_CONSTRUCTORS to MOZ_DECLARE_RELOCATE_USING_MOVE_CONSTRUCTOR

Differential Revision: https://phabricator.services.mozilla.com/D66243

--HG--
extra : moz-landing-system : lando
2020-03-20 17:04:27 +00:00
Mihai Alexandru Michis
2922453b6e Backed out 10 changesets (bug 1623278, bug 1617170, bug 1620273, bug 1597954) for causing bustages.
CLOSED TREE

Backed out changeset 50c0e58dd654 (bug 1623278)
Backed out changeset b31ddbcdd2f2 (bug 1597954)
Backed out changeset 8b03993a9234 (bug 1623278)
Backed out changeset ad7b08acadd6 (bug 1623278)
Backed out changeset bb094a6084b3 (bug 1623278)
Backed out changeset 7fdf38a403bb (bug 1623278)
Backed out changeset d69cf5fcb571 (bug 1620273)
Backed out changeset 5abef9862e60 (bug 1617170)
Backed out changeset 11d9ccb4ddd8 (bug 1617170)
Backed out changeset 6df7028b41d0 (bug 1617170)
2020-03-19 13:30:26 +02:00
Simon Giesecke
59bc885b82 Bug 1597954 - Switch indexedDB to use InitializedOnce from mfbt. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D65710

--HG--
extra : moz-landing-system : lando
2020-03-19 09:34:40 +00:00
Simon Giesecke
ad3730c81e Bug 1617170 - Fix non-unified build. r=janv,dom-workers-and-storage-reviewers
Based on a patch supplied by janv@mozilla.com

Differential Revision: https://phabricator.services.mozilla.com/D67129

--HG--
extra : moz-landing-system : lando
2020-03-17 11:28:49 +00:00
Simon Giesecke
efe737d7c3 Bug 1613340 - Remove const_cast relating to CursorResponse. r=jld,dom-workers-and-storage-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D61672

--HG--
extra : moz-landing-system : lando
2020-03-03 13:51:18 +00:00
Simon Giesecke
20603da0aa Bug 1613340 - Remove const_cast relating to SerializedStructuredCloneReadInfo. r=jld,dom-workers-and-storage-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D61671

--HG--
extra : moz-landing-system : lando
2020-03-03 13:50:48 +00:00
Simon Giesecke
e4bf6784c3 Bug 1613854 - Avoid copying non-trivial IPDL params. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D62023

--HG--
extra : moz-landing-system : lando
2020-02-18 16:37:49 +00:00
Simon Giesecke
e26d6083c0 Bug 1613854 - Pass nsresult/bool/int* by value instead of const &. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D61992

--HG--
extra : moz-landing-system : lando
2020-02-27 12:17:47 +00:00
Eric Rahm
124379887c Bug 1617327 - Part 2: Remove nsAutoPtr usage from ipc, security, IDB. r=mccr8,janv
This removes `nsAutoPtr` usage from ipc/. security/ failed to build due to missing includes so I fixed that as well. IDB was using `ThreadLocal` from ipc which had a member changed to a `UniquePtr` so needed to be updated as well. localstorage was missing some includes.

Differential Revision: https://phabricator.services.mozilla.com/D63745

--HG--
extra : moz-landing-system : lando
2020-02-24 19:26:40 +00:00
Jed Davis
ee171b6406 Bug 1615155 - Don't generate default Recv__delete__ if there are args. r=nika
The default method implementations cause problems when trying to
override them with different types in a direct call class.

For the `Recv__delete__` case there's a simple solution: omit it if
there are any arguments, because it doesn't make much sense to specify
arguments and then completely ignore them, and the no-arg case isn't a
problem for overriding.

Differential Revision: https://phabricator.services.mozilla.com/D62977

--HG--
extra : moz-landing-system : lando
2020-02-18 20:46:21 +00:00
Simon Giesecke
ce6596707f Bug 1613854 - De-virtualize IPDL protocol methods in ActorsChild. r=dom-workers-and-storage-reviewers,janv,jld
Differential Revision: https://phabricator.services.mozilla.com/D61991

--HG--
extra : moz-landing-system : lando
2020-02-17 14:49:27 +00:00
Mihai Alexandru Michis
13d11ce14a Backed out changeset 98a47607bb61 (bug 1613854) for causing sm failures in PBackgroundIDBCursorChild.cpp
CLOSED TREE
2020-02-17 16:03:20 +02:00
Simon Giesecke
7e65d8de67 Bug 1613854 - De-virtualize IPDL protocol methods in ActorsChild. r=dom-workers-and-storage-reviewers,janv,jld
Differential Revision: https://phabricator.services.mozilla.com/D61991

--HG--
extra : moz-landing-system : lando
2020-02-14 00:58:53 +00:00
Andrea Marchesini
ce6465d9ea Bug 1607791 - Get rid of IDBMutableFile.getFile() - part 1, r=asuth,janv
Differential Revision: https://phabricator.services.mozilla.com/D59140

--HG--
extra : moz-landing-system : lando
2020-01-15 12:02:21 +00:00
Mihai Alexandru Michis
4345a38d0d Backed out 9 changesets (bug 1607791, bug 1605566) for causing multiple wpt failures.
CLOSED TREE

Backed out changeset 39f34852842e (bug 1605566)
Backed out changeset 3427a92445c8 (bug 1605566)
Backed out changeset 36631ec96f1f (bug 1605566)
Backed out changeset 554b2bdce66c (bug 1605566)
Backed out changeset 37026beadbd8 (bug 1605566)
Backed out changeset f15835338319 (bug 1607791)
Backed out changeset 4c92f506cf62 (bug 1607791)
Backed out changeset 80707bcc8427 (bug 1607791)
Backed out changeset 75bc7533c899 (bug 1607791)
2020-01-15 13:45:33 +02:00
Andrea Marchesini
6c05c922e3 Bug 1607791 - Get rid of IDBMutableFile.getFile() - part 1, r=asuth,janv
Differential Revision: https://phabricator.services.mozilla.com/D59140

--HG--
extra : moz-landing-system : lando
2020-01-15 09:58:39 +00:00
Simon Giesecke
a5e45033f2 Bug 1600906 - Convert IDBCursor and BackgroundCursorChild to templates to increase type safety and reduce state. r=dom-workers-and-storage-reviewers,ytausky
This also simplifies delegating calls that are dependent on the cursor type.

Also reduce dependency on IDBCursor.h by moving enums and type traits to IDBCursorType.h

Differential Revision: https://phabricator.services.mozilla.com/D57993

--HG--
extra : moz-landing-system : lando
2020-01-10 15:23:52 +00:00
Csoregi Natalia
8c7b4f143a Backed out 3 changesets (bug 1600906) for bustage on StaticAnalysisFunctions.h. CLOSED TREE
Backed out changeset aae2faf1907c (bug 1600906)
Backed out changeset d61a65e2e4ac (bug 1600906)
Backed out changeset a114b9b8e6ea (bug 1600906)
2020-01-10 17:19:22 +02:00
Simon Giesecke
a48be584a9 Bug 1600906 - Convert IDBCursor and BackgroundCursorChild to templates to increase type safety and reduce state. r=dom-workers-and-storage-reviewers,ytausky
This also simplifies delegating calls that are dependent on the cursor type.

Also reduce dependency on IDBCursor.h by moving enums and type traits to IDBCursorType.h

Differential Revision: https://phabricator.services.mozilla.com/D57993

--HG--
extra : moz-landing-system : lando
2020-01-10 14:21:18 +00:00
Simon Giesecke
77ea686b98 Bug 1600283 - Replaced use of nsAutoPtr by UniquePtr. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D55520

--HG--
extra : moz-landing-system : lando
2019-12-19 09:57:49 +00:00
Simon Giesecke
55a2f652bc Bug 1598164 - Use scoped enums in IDBTransaction. r=dom-workers-and-storage-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D54321

--HG--
extra : moz-landing-system : lando
2019-11-27 10:54:57 +00:00
Simon Giesecke
0d86246c8c Bug 1599420 - Ensure that strong references to newly created cursors are kept until the DOM Binding is created. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D54704

--HG--
extra : moz-landing-system : lando
2019-11-26 14:38:16 +00:00
Simon Giesecke
06d137dba8 Bug 1596129 - Merge BackgroundRequestChild array members mPreprocessHelpers and mCloneDatas into one. r=dom-workers-and-storage-reviewers,ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D52859

--HG--
extra : moz-landing-system : lando
2019-11-21 16:46:08 +00:00
Simon Giesecke
a137d4ea5b Bug 1596129 - Removed code duplication between HandlePreprocess overloads. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D52844

--HG--
extra : moz-landing-system : lando
2019-11-20 13:26:16 +00:00
Simon Giesecke
ffec9b2750 Bug 1168606 - Set flag to invalidate in-flight responses as well. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D52559

--HG--
extra : moz-landing-system : lando
2019-11-14 16:14:02 +00:00
Simon Giesecke
deb959c93c Bug 1168606 - Resolved clang-tidy warnings. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D49274

--HG--
extra : moz-landing-system : lando
2019-11-08 13:22:28 +00:00
Simon Giesecke
608f5bac34 Bug 1168606 - Replace pseudo-move constructor of StructuredCloneReadInfo by explicit DeserializeStructuredCloneReadInfo function. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D46593

--HG--
extra : moz-landing-system : lando
2019-11-08 13:22:08 +00:00
Simon Giesecke
b6fc689caf Bug 1168606 - Do not use mContinueCalled for determining whether to cache a cursor response. r=ttung,asuth
Depends on D45674

Differential Revision: https://phabricator.services.mozilla.com/D45675

--HG--
extra : moz-landing-system : lando
2019-11-05 16:46:31 +00:00
Simon Giesecke
c3c98789cd Bug 1168606 - Removed duplication between different BackgroundCursorChild::HandleResponse overloads. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D45674

--HG--
extra : moz-landing-system : lando
2019-11-05 16:46:23 +00:00
Simon Giesecke
103f204d11 Bug 1168606 - Extract common function for discarding cached responses. r=ttung,asuth
Depends on D45308

Differential Revision: https://phabricator.services.mozilla.com/D45349

--HG--
extra : moz-landing-system : lando
2019-11-05 16:46:10 +00:00
Simon Giesecke
b09e7874fd Bug 1168606 - Add support for preloading key-only cursors. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D44009

--HG--
extra : moz-landing-system : lando
2019-11-05 14:40:31 +00:00
Simon Giesecke
59cd698867 Bug 1168606 - Support preloading also for index cursors. r=ttung,asuth
Depends on D43252

Differential Revision: https://phabricator.services.mozilla.com/D43461

--HG--
extra : moz-landing-system : lando
2019-11-05 14:40:35 +00:00
Simon Giesecke
9804c8f159 Bug 1168606 - Send extra records with every ObjectStoreCursorResponse if enabled by pref. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D43252

--HG--
extra : moz-landing-system : lando
2019-11-05 14:40:37 +00:00
Cosmin Sabou
1211bbc800 Backed out 12 changesets (bug 1168606) for causing build bustages on ActorsParent.cpp and Assertions.h. CLOSED TREE
Backed out changeset 307bd8d24407 (bug 1168606)
Backed out changeset a2ae085f929f (bug 1168606)
Backed out changeset 8fdc4a3d3ecb (bug 1168606)
Backed out changeset 918dc7cce5e9 (bug 1168606)
Backed out changeset 8c776a5cb5db (bug 1168606)
Backed out changeset dffe1e6c58bd (bug 1168606)
Backed out changeset 41f1bef0f019 (bug 1168606)
Backed out changeset 96cb7140a4f6 (bug 1168606)
Backed out changeset 6818224b9b11 (bug 1168606)
Backed out changeset f1be81af7d6b (bug 1168606)
Backed out changeset 8dc185488801 (bug 1168606)
Backed out changeset 9d8b02674d45 (bug 1168606)
2019-11-05 16:34:22 +02:00
Simon Giesecke
95a4ff4109 Bug 1168606 - Do not use mContinueCalled for determining whether to cache a cursor response. r=ttung,asuth
Depends on D45674

Differential Revision: https://phabricator.services.mozilla.com/D45675

--HG--
extra : moz-landing-system : lando
2019-11-05 13:23:58 +00:00
Simon Giesecke
e4ad20d178 Bug 1168606 - Removed duplication between different BackgroundCursorChild::HandleResponse overloads. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D45674

--HG--
extra : moz-landing-system : lando
2019-11-05 12:48:28 +00:00
Simon Giesecke
8835742b38 Bug 1168606 - Extract common function for discarding cached responses. r=ttung,asuth
Depends on D45308

Differential Revision: https://phabricator.services.mozilla.com/D45349

--HG--
extra : moz-landing-system : lando
2019-11-05 13:23:34 +00:00
Simon Giesecke
024a6ea519 Bug 1168606 - Add support for preloading key-only cursors. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D44009

--HG--
extra : moz-landing-system : lando
2019-11-05 12:46:16 +00:00
Simon Giesecke
69cd8f61cb Bug 1168606 - Support preloading also for index cursors. r=ttung,asuth
Depends on D43252

Differential Revision: https://phabricator.services.mozilla.com/D43461

--HG--
extra : moz-landing-system : lando
2019-11-05 12:45:48 +00:00
Simon Giesecke
1db45a09bf Bug 1168606 - Send extra records with every ObjectStoreCursorResponse if enabled by pref. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D43252

--HG--
extra : moz-landing-system : lando
2019-11-05 12:48:36 +00:00
Simon Giesecke
cd0b6f05a1 Bug 1168606 - Use const where easily possible. r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D43631

--HG--
extra : moz-landing-system : lando
2019-10-03 07:56:45 +00:00
Oana Pop Rus
cb31d323be Backed out 5 changesets (bug 1168606) for xpcshell failures in dom/indexedDB/test/unit/test_temporary_storage.js on a CLOSED TREE
Backed out changeset fc5e1bee1332 (bug 1168606)
Backed out changeset 63cf0966cb41 (bug 1168606)
Backed out changeset f844afbebc6a (bug 1168606)
Backed out changeset 9e7a90dcc429 (bug 1168606)
Backed out changeset e493a6b5f125 (bug 1168606)
2019-10-02 02:28:15 +03:00