Граф коммитов

389 Коммитов

Автор SHA1 Сообщение Дата
Dave Townsend c9061686f8 Bug 1635489: Add telemetry on the status of sqlite database accesses. r=mak
Includes baddataDB.sqlite which is a copy of goodDB.sqlite but with what appears
to be the row count inflated beyond the end of the file. This causes loading the
database to succeed but queries to fail.

This increments a scalar for every database open and for every database query
where a query is the full execution of a statement from start to completion. If
a statement is re-used then the scalar will be incremented once for each use.

Differential Revision: https://phabricator.services.mozilla.com/D73938
2020-08-11 20:55:33 +00:00
Razvan Maries be21687a00 Backed out changeset af815754d58a (bug 1635489) for perma failures on test_statement_executeAsync.js. CLOSED TREE 2020-08-11 00:21:05 +03:00
Dave Townsend d49a4517e8 Bug 1635489: Add telemetry on the status of sqlite database accesses. r=mak
Includes baddataDB.sqlite which is a copy of goodDB.sqlite but with what appears
to be the row count inflated beyond the end of the file. This causes loading the
database to succeed but queries to fail.

This increments a scalar for every database open and for every database query
where a query is the full execution of a statement from start to completion. If
a statement is re-used then the scalar will be incremented once for each use.

Differential Revision: https://phabricator.services.mozilla.com/D73938
2020-08-10 20:09:27 +00:00
Kris Maglione b6be72f351 Bug 1649554: Part 1 - Move deprecated component registration helpers out of XPCOMUtils. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,whimboo,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81749
2020-07-10 23:58:30 +00:00
Kris Maglione 9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Simon Giesecke f3d8e02f37 Bug 1620198 - Part 1: Remove CreateAggregateFunction. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D65505
2020-06-08 09:59:57 +00:00
Ryan VanderMeulen 750150f551 Bug 1619522 - Upgrade to SQLite 3.32.1. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D76860
2020-05-29 14:18:09 +00:00
Simon Giesecke d0816721e3 Bug 1626570 - Improve handling of copying arrays in storage/. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D73683
2020-05-06 11:54:36 +00:00
Ed Lee acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Lina Cambridge 9d9b081407 Bug 1588329 - Introduce `mozIStorageAsyncConnection::variableLimit`. r=mak
This is a wrapper around the `sqlite3_limit` interface that returns the
binding parameter limit. Adding this getter lets us clean up the inline
`SQLITE_MAX_VARIABLE_NUMBER` constants scattered around Places.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 21:22:57 +00:00
Gijs Kruitbosch 847224881f Bug 1575692 - do not recreate the DB file via the directory service inside DatabaseLocker class off the mainthread, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D43225

--HG--
extra : moz-landing-system : lando
2019-08-27 14:31:48 +00:00
Victor Porof 93517ce014 Bug 1561435 - Fix linting errors for storage/, r=standard8
# ignore-this-changeset

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

--HG--
extra : source : 79fe200fde95a459a3af42ce5818d09fbba2dbda
extra : intermediate-source : 6359e8b271dfe06430ac7f373ae14b72f1ede5da
2019-06-21 13:32:39 -07:00
Victor Porof 9eeaa5c80c Bug 1561435 - Format storage/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 77bfd37cea066708241ba39795e94f5ee4a06ff6
2019-07-05 10:59:24 +02:00
Ehsan Akhgari 4cb428d268 Bug 1555205 - Move db/sqlite3 to third_party/; r=mak
Differential Revision: https://phabricator.services.mozilla.com/D32939

--HG--
rename : db/sqlite3/README => third_party/sqlite3/README
rename : db/sqlite3/README.MOZILLA => third_party/sqlite3/README.MOZILLA
rename : db/sqlite3/src/moz.build => third_party/sqlite3/src/moz.build
rename : db/sqlite3/src/sqlite.symbols => third_party/sqlite3/src/sqlite.symbols
rename : db/sqlite3/src/sqlite3.c => third_party/sqlite3/src/sqlite3.c
rename : db/sqlite3/src/sqlite3.h => third_party/sqlite3/src/sqlite3.h
extra : moz-landing-system : lando
2019-05-29 10:16:29 +00:00
Boris Zbarsky 202f15eaec Bug 1552547 part 2. Stop using [array] in mozIStorageBindingParams. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D31659

--HG--
extra : moz-landing-system : lando
2019-05-20 16:30:12 +00:00
Boris Zbarsky f1f2d7ade1 Bug 1552547 part 1. Stop using [array] in mozIStorageAsyncConnection.executeAsync. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D31658

--HG--
extra : moz-landing-system : lando
2019-05-20 16:17:51 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Andrea Marchesini 85f93c4ddc Bug 1541934 - mozStorageConnection can crash on shutdown, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26491

--HG--
extra : moz-landing-system : lando
2019-04-11 16:43:13 +00:00
Andreea Pavel 35a8067dab Backed out changeset 6e87244c4b89 (bug 1541934) for failing xpcshell at test_removeDataFromDomain.js on a CLOSED TREE 2019-04-11 16:57:19 +03:00
Andrea Marchesini afbad5faf0 Bug 1541934 - mozStorageConnection can crash on shutdown, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26491

--HG--
extra : moz-landing-system : lando
2019-04-11 11:14:51 +00:00
Sylvestre Ledru 03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Lina Cambridge 0cdebe20d7 Bug 1539104 - Add a way to detect supported storage connection operations. r=mak
In retrospect, overloading `Connection::connectionReady` to mean
"is ready _and_ supports this operation" wasn't a good idea. This
commit reverts that change (cfd44c936a9b), and adds two new methods:

* `Connection::operationSupported`, to check if a connection supports
  sync or async operations. This method is public.
* `Connection::ensureOperationSupported`, that asserts or returns an
  error if the connection doesn't support an operation. This is
  private.

`operationSupported` is used by callers like `Service::minimizeMemory`
to detect if the connection supports sync operations, since both sync
and async connections implement `mozIStorageConnection` now.

Finally, some callers used `!mDBConn` to check if the connection was
ready, while others used `connectionReady()`. This commit changes them
to use the latter.

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

--HG--
extra : moz-landing-system : lando
2019-04-02 18:49:21 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Lina Cambridge 3e894ac30e Bug 1482608 - Add basic Rust bindings for mozStorage. r=nika,asuth,mak
This commit wraps just enough of the mozStorage API to support the
bookmarks mirror. It's not complete: for example, there's no way
to open, clone, or close a connection, because the mirror handles
that from JS. The wrapper also omits shutdown blocking and retrying on
`SQLITE_BUSY`.

This commit also changes the behavior of sync and async mozStorage
connections. Async (`mozIStorageAsyncConnection`) methods may be called
from any thread on any connection. Sync (`mozIStorageConnection`)
methods may be called from any thread on a sync connection, and from
background threads on an async connection. All connections now QI
to `mozIStorageConnection`, but attempting to call a sync method on
an async connection from the main thread throws.

Finally, this commit exposes an `OpenedConnection::unsafeRawConnection`
getter in Sqlite.jsm, for JS code to access the underlying connection.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 04:49:18 +00:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 6f45c666bc Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:35 +00:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Jan de Mooij 646dcf51d4 Bug 1506554 part 2 - Actually call cleanupLocaleTests in storage/test/unit/test_locale_collation.js. r=asuth
The cleanup function was there but never called, as far as I can see.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 07:46:34 +00:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Kris Maglione bf2e2a90f0 Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8

--HG--
extra : source : 5f870621361012ba459943212d8c68a9ff81cb16
extra : intermediate-source : 89a0c0874d400dd324df6fc3627c0c47d130df19
extra : histedit_source : bbd7900e3d754bde925a411c10aa30a1d6e22edd
2018-07-27 15:26:08 -07:00
Narcis Beleuzu 72f96acd7b Backed out 2 changesets (bug 1479035) for assertion failure: mEvents. CLOSED TREE
Backed out changeset 89a0c0874d40 (bug 1479035)
Backed out changeset 5152af6ab3e3 (bug 1479035)
2018-09-26 23:40:13 +03:00
Kris Maglione d12c05e8f8 Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8

--HG--
extra : rebase_source : 897e2d32d1dfee24d51459065925fb9b41fa543a
extra : source : 5f870621361012ba459943212d8c68a9ff81cb16
2018-07-27 15:26:08 -07:00
Noemi Erli 36cc0e5fa7 Backed out 2 changesets (bug 1479035) for build bustages bustages netwerk/cache2/target on CLOSED TREE
Backed out changeset 5f8706213610 (bug 1479035)
Backed out changeset a03a61d6d724 (bug 1479035)
2018-09-26 08:54:03 +03:00
Kris Maglione 0116c49d5b Bug 1479035: Part 2 - Get rid of PRThread to nsThread map. r=erahm
These maps hold strong references which complicate nsThread lifetime handling
considerably, and only have a couple of fringe uses. We have a linked list of
active threads that the thread manager can use for its internal enumeration
purposes, and the external uses are easily done away with, so there doesn't
seem to be much reason to keep the map around.

MozReview-Commit-ID: x7dsj6C4x8

--HG--
extra : rebase_source : 88c56fa4f5da97f33ade08d892c3d8c42666307e
2018-07-27 15:26:08 -07:00
Kris Maglione 53f96aa226 Bug 1486182: Part 2a - Add Services.catMan getter for the category manager. r=mossop
This makes it much easier to update existing consumers of
XPCOMUtils.enumerateCategoryEntries to use the category manager directly.

It also, unfortunately, requires updating existing category manager consumers
to use the Services getter in order to avoid ESLint errors.

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

--HG--
extra : rebase_source : fb9fd9b21db80af472ff6250a2e9a35e8d538147
2018-08-24 22:13:57 -07:00
Kris Maglione 3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
Kris Maglione 356dd0de4a Bug 1484466: Part 3a - Update remaining XPCOMUtils.generateQI callers to use ChromeUtils. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3709

--HG--
extra : rebase_source : 650545d3e58ab92821a9ea2097793cca5996d5b3
2018-08-18 12:44:57 -07:00
Calixte Denizet cfaea27109 Bug 1473531 -- Disable gtest storage_DeadlockDetectorTest.storage_Sanity5DeathTest for macosx ccov build.
Summary: GTest is permafailing because of this test (GTest is always running over 1200s).

Reviewers: froydnj

Reviewed By: froydnj

Bug #: 1473531

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

--HG--
extra : rebase_source : 07413c4d7ba4eb6bd1439f292bd489a775dab61b
2018-07-17 21:24:12 +03:00
Mark Banner fe1b5d201f Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for storage/test/unit. r=mak
MozReview-Commit-ID: KZNpShBcfjJ

--HG--
extra : rebase_source : 8e11f26fe9d713bfc17e97f0fb4871bd9f3b0bad
2018-06-01 14:03:20 +01:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00