Commit Graph
221 Commits
Author SHA1 Message Date
Sylvestre Ledru 61edb7ef6d Bug 2036402 - Apply std::move in storage where values can be moved instead of copied r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D298111
2026-05-28 12:52:18 +00:00
Marco Bonardo 1cfbeef870 Bug 2037644 - Stop using sqlite3_finalize() return value as representative of the finalization result. r=asuth
sqlite3_finalize() returns the last *evaluation* result of the prepared
statement (e.g. SQLITE_CONSTRAINT if the last step failed), not a status
indicating whether finalization itself succeeded. Finalization always
succeeds and frees the statement; the return value is informational only.

Also fix the finalize loop in internalClose(): after finalizing a
statement, SQLite removes it from its internal linked list, so the next
call must restart from nullptr rather than from the now-dangling pointer.

Differential Revision: https://phabricator.services.mozilla.com/D299528
2026-05-13 09:55:31 +00:00
Daniel Holbert 9a9241a112 Bug 2038746: Use MakeRefPtr to do allocation for local RefPtr variables, in storage/. r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D299790
2026-05-12 07:22:51 +00:00
Norisz Fay ed803af7c5 Revert "Bug 2038746: Use MakeRefPtr to do allocation for local RefPtr variables, in storage/. r=saschanaz" for causing bustage @ test_unlock_notify.cpp
This reverts commit 9de44784b9.
2026-05-11 23:36:10 +00:00
Daniel Holbert 9de44784b9 Bug 2038746: Use MakeRefPtr to do allocation for local RefPtr variables, in storage/. r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D299790
2026-05-11 21:59:13 +00:00
Randell Jesup 5c03afd03d Bug 2031647: Pass the NativeConnection as a parameter to resolve data-race r=jari
Differential Revision: https://phabricator.services.mozilla.com/D294479
2026-04-24 10:53:57 +00:00
Marco Bonardo 040c78bacc Bug 2026284. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D291740
2026-04-16 10:32:00 +00:00
Sylvestre Ledru 77f982c1ca Bug 2023419 - Remove Emacs/Vim modelines from storage/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287870
2026-03-16 19:40:31 +00:00
Henri SivonenandAndré Bargull 10352a6874 Bug 1937541 - Migrate collation to ICU4X. r=supply-chain-reviewers,places-reviewers,dom-storage-reviewers,layout-reviewers,TYLin,jari,anba,m_kato,smaug
Co-authored-by: André Bargull <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D251862
2026-03-10 22:05:37 +00:00
Silaghi 16270fc2e8 Revert "Bug 1937541 - Migrate collation to ICU4X. r=supply-chain-reviewers,places-reviewers,dom-storage-reviewers,layout-reviewers,TYLin,jari,anba,m_kato" for causing multiple mochitest-plain failures
This reverts commit 6cccabf457.
2026-03-10 14:33:17 +00:00
Henri SivonenandAndré Bargull 6cccabf457 Bug 1937541 - Migrate collation to ICU4X. r=supply-chain-reviewers,places-reviewers,dom-storage-reviewers,layout-reviewers,TYLin,jari,anba,m_kato
Co-authored-by: André Bargull <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D251862
2026-03-10 13:15:27 +00:00
Marco Bonardo b1e2f143d4 Bug 1998267 - Fix compilation of the carray SQLite extension. r=RyanVM,asuth
Differential Revision: https://phabricator.services.mozilla.com/D271612
2026-02-06 10:56:28 +00:00
Cristina Horotan 24531c8fa5 Revert "Bug 1998267 - Fix compilation of the carray SQLite extension. r=RyanVM,asuth" on request for causing Bug 1999921
This reverts commit 4cd49eb13b.

Revert "Bug 1998267 - Upgrade to SQLite 3.51.0. r=RyanVM"

This reverts commit 30f9ab4ef3.

Revert "Bug 1998267 - Upgrade SQLite vendoring. r=RyanVM"

This reverts commit ca26f4e880.
2025-11-15 16:37:36 +00:00
Marco Bonardo 4cd49eb13b Bug 1998267 - Fix compilation of the carray SQLite extension. r=RyanVM,asuth
Differential Revision: https://phabricator.services.mozilla.com/D271612
2025-11-12 21:54:05 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Travis Long d1e1933599 Bug 1977614 - Address perf regression by only tracking only failure mode categories.r=mak
This addresses the performance regression from Bug 1977614, as well as
the one from Bug 1977805 by limiting the instrumentation of sqlite
operations to only the failure modes, removing "success" which was
accounting for 97% of the work.

Differential Revision: https://phabricator.services.mozilla.com/D259278
2025-08-04 15:44:03 +00:00
agoloman c1eb308fa3 Revert "Bug 1977614 - Address perf regression by only tracking only failure mode categories.r=mak" for causing xpc failures @test_statement_executeAsync.js. This reverts commit 70716b48b6. 2025-08-01 12:45:36 +00:00
Travis Long 70716b48b6 Bug 1977614 - Address perf regression by only tracking only failure mode categories.r=mak
This addresses the performance regression from Bug 1977614, as well as
the one from Bug 1977805 by limiting the instrumentation of sqlite
operations to only the failure modes, removing "success" which was
accounting for 97% of the work.

Differential Revision: https://phabricator.services.mozilla.com/D259278
2025-08-01 11:17:57 +00:00
Florian Quèze 344770bf07 Bug 1960567 - Migrate histograms to use Glean APIs in storage/mozStorageConnection.cpp, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D255540
2025-07-08 11:38:15 +00:00
Marco Bonardo a7368f6216 Bug 1953266 - Vendor sqlite-vec extension for Firefox. r=asuth,glandium,tjr
Sqlite-vec is a SQLite extension that allows to store and retrieve
vectors and various distance between them. It is a bring your own
vectors kind of solution.

Differential Revision: https://phabricator.services.mozilla.com/D244347
2025-04-22 16:38:14 +00:00
Marco Bonardo 4caef50798 Bug 1942708 - sqlite3_close() must be invoked even if sqlite3_open_v2() fails. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D234999
2025-01-23 10:25:06 +00:00
Marco Bonardo 716fcfc679 Bug 483318 - Implement binding arrays to mozIStorageStatementParams. r=asuth,lina,Standard8
Use `carray`` extension to bind array of numerics and strings, so we can
avoid large and slow IN clauses, and cache prepared statements having
a variable number of parameters.
The extension is statically loaded and available in every connection.
Consumers are encouraged to use the explicit `bindArrayXXX` methods, as
the generic `bindByIndex` and `bindByName` methods are too lenient,
especially from Javascript.
Note `carray`` only supports UTF8 encoded strings, the API will convert
the encoding when UTF16 is passed in.
These new variants are not exposed to Rust yet, as the existing comment
suggests they were intended for primitive types. It could be done in the
future, if necessary.

Differential Revision: https://phabricator.services.mozilla.com/D225334
2024-10-28 19:28:24 +00:00
Adi da4c3b7a72 Backed out 3 changesets (bug 1594368, bug 483318) for causing multiple failures. CLOSED TREE
Backed out changeset 6107713f0780 (bug 1594368)
Backed out changeset d23ddf67f8a4 (bug 483318)
Backed out changeset 507b979e3c93 (bug 483318)
2024-10-23 16:51:45 +03:00
Marco Bonardo 22cfe51343 Bug 483318 - Implement binding arrays to mozIStorageStatementParams. r=asuth,lina,Standard8
Use `carray`` extension to bind array of numerics and strings, so we can
avoid large and slow IN clauses, and cache prepared statements having
a variable number of parameters.
The extension is statically loaded and available in every connection.
Consumers are encouraged to use the explicit `bindArrayXXX` methods, as
the generic `bindByIndex` and `bindByName` methods are too lenient,
especially from Javascript.
Note `carray`` only supports UTF8 encoded strings, the API will convert
the encoding when UTF16 is passed in.
These new variants are not exposed to Rust yet, as the existing comment
suggests they were intended for primitive types. It could be done in the
future, if necessary.

Differential Revision: https://phabricator.services.mozilla.com/D225334
2024-10-23 12:42:50 +00:00
Oliver Old 228997534a Bug 1776893 - Replace do_CreateInstance for nsIFile with NS_NewLocalFile. r=xpcom-reviewers,profiler-reviewers,emilio,aabh
Differential Revision: https://phabricator.services.mozilla.com/D226255
2024-10-22 09:45:32 +00:00
Florian Quèze b3ed96f65d Bug 1913624 - Remove expired telemetry histogram THREAD_WAKEUP, r=TravisLong.
Depends on D219460

Differential Revision: https://phabricator.services.mozilla.com/D219461
2024-08-20 20:56:45 +00:00
Niklas Baumgardner bdf028d4e2 Bug 1900093 - Add OPEN_NOT_EXCLUSIVE option for opening sqlite database. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D212466
2024-06-12 00:17:58 +00:00
Mike Conley a45d00e343 Bug 1891141 - Add configuration parameters for pages per step and step delay to mozIStorageAsyncConnection.backupToFileAsync. r=mak
This also fixes a bug in the test_connection_online_backup.js test which wasn't
properly evaluating that the page_size PRAGMA was being copied properly.

Differential Revision: https://phabricator.services.mozilla.com/D207471
2024-04-17 20:50:47 +00:00
Emilio Cobos Álvarez de09ab0dd6 Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...

This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.

Differential Revision: https://phabricator.services.mozilla.com/D205601
2024-04-04 11:49:57 +00:00
abhishekmadan30 35f5bdaf2c Bug 1884941 - Add an option to URLParams::Parse() for if it should decode the parameters or not. r=anti-tracking-reviewers,necko-reviewers,valentin,timhuang.
Differential Revision: https://phabricator.services.mozilla.com/D204914
2024-03-28 18:02:16 +00:00
Iulian Moraru e6f4355ff3 Backed out 3 changesets (bug 1877419, bug 1884941) for causing non unified build bustages on URLQueryStringStripper.cpp. CLOSED TREE
Backed out changeset 53db0be27620 (bug 1877419)
Backed out changeset b7fab4b145f7 (bug 1877419)
Backed out changeset 78436da20d95 (bug 1884941)
2024-03-26 19:37:45 +02:00
abhishekmadan30 e94987e2b4 Bug 1884941 - Add an option to URLParams::Parse() for if it should decode the parameters or not. r=anti-tracking-reviewers,necko-reviewers,valentin,timhuang.
Differential Revision: https://phabricator.services.mozilla.com/D204914
2024-03-26 14:42:07 +00:00
Noemi Erli 89ffefa292 Backed out 3 changesets (bug 1884941, bug 1877419) for causing bustage in URLQueryStringStripper.cpp CLOSED TREE
Backed out changeset 32c74a4cd05b (bug 1877419)
Backed out changeset c2ca2f596c09 (bug 1877419)
Backed out changeset 45931e6db21e (bug 1884941)
2024-03-25 21:50:27 +02:00
abhishekmadan30 d41edcad79 Bug 1884941 - Add an option to URLParams::Parse() for if it should decode the parameters or not. r=anti-tracking-reviewers,necko-reviewers,valentin,timhuang.
Differential Revision: https://phabricator.services.mozilla.com/D204914
2024-03-25 18:30:38 +00:00
Marco Bonardo 5cac8986d2 Bug 1884308 - Chunk bookmark GUIDs when retrieving details to avoid going over Sqlite variables limit. r=mconley,places-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D204660
2024-03-15 16:18:00 +00:00
Mike Conley f27ff0993e Bug 1869060 - Add SQLite Online Backup API support via mozIStorageAsyncConnection. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D195934
2024-01-22 14:26:53 +00:00
Marco Bonardo 21a8c4d7e6 Bug 1855455 - Implement a loadExtension() API in mozStorage. r=asuth
The API can only load from a predetermined list of extensions statically built
in the same library as SQLite (either nss3 or mozsqlite3 at this time).
New extensions must be audited and their code updated through the update.sh
script.
All the extensions should be compilable and usable across all the tier1
platforms and from Rusqlite.

Differential Revision: https://phabricator.services.mozilla.com/D191316
2023-11-21 08:34:35 +00:00
Sandor Molnar 33f0b3f19a Backed out 3 changesets (bug 1855455) for causing build bustages at third_party/sqlite3/src/version
Backed out changeset 0a5cdc279edd (bug 1855455)
Backed out changeset f43c32558446 (bug 1855455)
Backed out changeset bda7a6ca45db (bug 1855455)
2023-11-15 19:17:16 +02:00
Marco Bonardo 982a9ab750 Bug 1855455 - Implement a loadExtension() API in mozStorage. r=asuth
The API can only load from a predetermined list of extensions statically built
in the same library as SQLite (either nss3 or mozsqlite3 at this time).
New extensions must be audited and their code updated through the update.sh
script.
All the extensions should be compilable and usable across all the tier1
platforms and from Rusqlite.

Differential Revision: https://phabricator.services.mozilla.com/D191316
2023-11-15 10:52:50 +00:00
hsingh 08ca90200e Bug 1843229: Created header files to declare external functions in BaseVFS.cpp, QuotaVFS.cpp and ObfuscatingVFS.cpp.r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187992
2023-09-26 14:51:38 +00:00
hsingh 01ade50f90 Bug 1843229: Fixing wrong cast.r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D187283
2023-09-26 14:51:38 +00:00
Marco Bonardo b7b8ae15ad Bug 1638256 - Some casts and fixes in mozStorage to make clang-tidy happy. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D181551
2023-06-24 10:11:28 +00:00
Marco Bonardo a2c1ce84fc Bug 1638256 - Use mTelemetryFilename for the mozStorage thread name. r=asuth
Depends on D181037

Differential Revision: https://phabricator.services.mozilla.com/D181038
2023-06-24 10:11:28 +00:00
Marco Bonardo ced0eaadae Bug 1638256 - Initialize mTelemetryFilename in the Connection constructor. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D181037
2023-06-24 10:11:28 +00:00