Commit Graph

573 Commits

Author SHA1 Message Date
Boris Zbarsky
2e33a36d6f Bug 1581278 part 3. Stop incorrectly rejecting promises in storage manager. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D46384

--HG--
extra : moz-landing-system : lando
2019-09-19 18:18:28 +00:00
Jan Varga
3ca5b40b9a Bug 1581127 - Add IsShuttingDown checks to DOM Cache origin initialization; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D45846

--HG--
extra : moz-landing-system : lando
2019-09-13 16:43:30 +00:00
Tom Tung
c960a1a6b6 Bug 1580238 - Extend the release for the prob of initialization time on QM and add another one to catch the longest time; r=janv,sg
Differential Revision: https://phabricator.services.mozilla.com/D45501

--HG--
extra : moz-landing-system : lando
2019-09-11 13:55:50 +00:00
Simon Giesecke
eea9483c1b Bug 1578146 - Moved test case to test_validOrigins.js after fixes to rust-url. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D44354

--HG--
extra : moz-landing-system : lando
2019-09-02 21:18:02 +00:00
Mark Banner
709c7ccf0c Bug 1577746 - Automatically enable more ESLint rules for dom/. r=baku
This enables:
- mozilla/no-useless-parameters
- mozilla/no-useless-run-test
- no-extra-boolean-cast
- no-unneeded-ternary

Depends on D44150

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

--HG--
extra : moz-landing-system : lando
2019-09-02 11:23:26 +00:00
Mark Banner
351d147e2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44149

--HG--
extra : moz-landing-system : lando
2019-09-02 11:22:27 +00:00
Gurzau Raul
e4ce5cd90c Backed out changeset cbce223800c1 (bug 1540247) for xpcshell failures at test_obsoleteOrigins.js on a CLOSED TREE. 2019-08-28 19:47:27 +03:00
Simon Giesecke
fc1e20f375 Bug 1540247 - Expose MozURL::Init to JS for QuotaManager tests r=ttung,asuth
Differential Revision: https://phabricator.services.mozilla.com/D39207

--HG--
extra : moz-landing-system : lando
2019-08-27 18:14:35 +00:00
Jan Varga
359aa0d597 Bug 1576453 - Fix a problem with unused variable in non-nightly builds; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D43357

--HG--
extra : moz-landing-system : lando
2019-08-25 17:39:17 +00:00
Jan Varga
f4529437df Bug 1563023 - Part 9: Ignore quota cache if LSNG is disabled; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D39881

--HG--
extra : moz-landing-system : lando
2019-08-25 00:45:41 +00:00
Jan Varga
f4d108788b Bug 1563023 - Part 8: Ignore quota cache if the user loads the same profile in different builds; r=asuth
This patch adds support for quota cache invalidation if the profile is loaded in different builds.

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

--HG--
extra : moz-landing-system : lando
2019-08-25 00:45:19 +00:00
Jan Varga
3e97ea2f34 Bug 1563023 - Part 7: Implement caching functionality; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D38817

--HG--
extra : moz-landing-system : lando
2019-08-25 01:34:37 +00:00
Jan Varga
76cfa3e3e3 Bug 1563023 - Part 6: Simplify iterations over all client types; r=asuth
This patch converts index based client type loops to iterator based client type
loops. This way the static cast is avoided and the loops are simpler and more
readable.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 04:48:36 +00:00
Jan Varga
d97b501006 Bug 1563023 - Part 5: Rationalize Client::TypeToText and Client::TypeFromText methods; r=asuth
This patch makes it easier to create new Client::TypeTo and Client::TypeFrom
variations by creating generic reusable helpers.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 04:49:14 +00:00
Jan Varga
a650fac7b0 Bug 1563023 - Part 4: Get rid of custom usage tracking in LS by using client usage tracked by QM; r=asuth
This patch gets rid of gUsages in LSNG. This provides better consistency and
makes it easier to cache quota info on disk.
The patch also fixes some edge cases when usage was not adjusted correctly after
a failed file or database operation.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 04:46:14 +00:00
Jan Varga
0e46119bb9 Bug 1563023 - Part 3: Change client usage type to support the null value; r=asuth
This patch wraps the uint64_t type in a Maybe container, so the client usage can
represent a state when there are no files on disk for the given client. Zero
usage then represents a state when there are some files but they are empty or
the client tracks logical size (not physical size of files on disk) and the
logical size is zero. This can be useful especially for LocalStorage.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 20:52:09 +00:00
Jan Varga
9ab967ef1e Bug 1563023 - Part 2: Add support for getting origin usage from memory; r=asuth
This patch modifies getUsageForPrincipal to support getting origin usage from
memory. Support for getting group usage is factored out to a standalone method
called Estimate.
Operations based on NormalOriginOperationBase can now avoid directory locking
if they don't touch disk.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 20:51:09 +00:00
Jan Varga
9f906cd7c4 Bug 1563023 - Part 1: Implement per client usage tracking; r=asuth
This patch adds a fixed-size array of client usages to OriginInfo and modifies
quota tracking APIs to require the client type to be passed in.
A new method ResetUsageForClient is implemented. The method is used during
client-specific origin clearing. ResetUsageForClient is much faster than calling
GetUsageForOrigin and calling DecreaseUsageForOrigin after that.
LockedUsage now has an assertion that verifies that the total sum of client
usages matches total origin usage. This method should be called instead of
touching mUsage directly.
A new assertion is added to GetQuotaObject which verifies that passed file
belongs to the given persistence type, origin, and client.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 13:06:48 +00:00
Nicholas Nethercote
de6c6401b1 Bug 1570212 - Convert dom.quotaManager.temporaryStorage.* to static prefs. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D40003

--HG--
extra : moz-landing-system : lando
2019-08-01 06:00:52 +00:00
Nicholas Nethercote
7d1b516ac2 Bug 1570212 - Convert dom.quotaManager.testing to a static pref. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D40002

--HG--
extra : moz-landing-system : lando
2019-08-01 06:00:35 +00:00
Nicholas Nethercote
cd426e3ad2 Bug 1569526 - Remove return values from Add*VarCache(). r=KrisWright
They're infallible in practice and always `NS_OK`. (This stems from
`AddVarCacheNoAssignment()` always returning `NS_OK`.)

As a result, the commit removes lots of unnecessary checks.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 06:19:46 +00:00
Byron Campen [:bwc]
13d7ab645a Bug 1566445: Rename a couple of macros to avoid conflicts. r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D38226

--HG--
extra : moz-landing-system : lando
2019-07-20 15:56:31 +00:00
Eugen Sawin
532f60a55d Bug 1501108 - [1.7] Add GeckoView Session Context ID support. r=snorp,baku,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D19182

--HG--
extra : moz-landing-system : lando
2019-07-21 17:18:37 +00:00
Kris Maglione
0962c2b731 Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.

There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.

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

--HG--
extra : rebase_source : 39ba8fec2e882cfe577c5f2b58ab7e4b461f1178
2019-07-15 16:19:32 -07:00
Jonathan Kingston
31441f82ea Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504

--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Victor Porof
0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Tom Tung
b8c27feb30 Bug 1529016 - P1 - Collect unexpected file's name in the origin directories; r=asuth,chutten
Differential Revision: https://phabricator.services.mozilla.com/D34721

--HG--
extra : moz-landing-system : lando
2019-06-18 21:06:32 +00:00
Daniel Varga
c19a162836 Merge mozilla-central to mozilla-inbound 2019-06-15 00:43:08 +03:00
Mark Banner
c51c2a8807 Bug 1558822 - Fix more issues related to shadowing of variables in dom/ code. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D34760

--HG--
extra : moz-landing-system : lando
2019-06-14 18:04:01 +00:00
Tom Tung
7c2a83b224 Bug 1322569 - Recognize the about:reader?url=xxx as an obsolete origin in quota manager; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D34898

--HG--
extra : moz-landing-system : lando
2019-06-14 12:33:19 +00:00
Jan Varga
82fad8077a Bug 1542572 - Add more temporary logging to LocalStorageShutdownTimeout crash annotation; r=asuth dr=chutten
Differential Revision: https://phabricator.services.mozilla.com/D34295
2019-06-09 21:46:34 +02:00
Andrea Marchesini
bb718d74fc Bug 1490044 - Remove DOMPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33510

--HG--
extra : moz-landing-system : lando
2019-06-13 09:02:03 +00:00
Eden Chuang
e8c9e6170c Bug 1516333 - Part 1: Move group and origin re-escaping from QuotaManager::GetQuotaObject to GetQuotaObjectFromNameAndParameters in TelemetryVFS.cpp; r=janv,asuth
Differential Revision: https://phabricator.services.mozilla.com/D33769
2019-06-07 08:04:57 +02:00
Narcis Beleuzu
83a9f3a6b3 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-06-05 00:52:43 +03:00
Narcis Beleuzu
790ffc99ca Merge inbound to mozilla-central. a=merge 2019-06-05 00:43:34 +03:00
Jan Varga
4ccc2c149c Bug 1556730 - QM: Add IsShuttingDown checks to temporary storage initialization; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D33636
2019-06-04 15:44:11 +02:00
Valentin Gosu
3eed61b8a1 Bug 1548306 - Do not allow the ^ character to appear in the hostname r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D32895

--HG--
extra : moz-landing-system : lando
2019-06-04 13:35:47 +00:00
Jan Varga
fe813f031d Bug 1534431 - Part 2: Disallow LS requests with undefined client id; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D33595
2019-06-03 15:32:59 +02:00
Tom Tung
04c511ffb3 Bug 944918 - Allow thumbs.db in the storage directory; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D33453

--HG--
rename : dom/quota/test/unit/test_whiteListFiles.js => dom/quota/test/unit/test_allowListFiles.js
extra : moz-landing-system : lando
2019-06-03 16:22:43 +00:00
Valentin Gosu
b8bdfab7c9 Bug 1536744 - Remove nsIProtocolHandler.newURI r=baku
Differential Revision: https://phabricator.services.mozilla.com/D30703

--HG--
extra : moz-landing-system : lando
2019-05-28 13:49:27 +00:00
Sylvestre Ledru
d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab
af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru
c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Tom Tung
390ed47019 Bug 1546752 - Stop creating, writing, and reading the .metadata file in QuotaManager except the upgrades; r=janv
The main goal of this issue is to reduce IO during the storage initialization
and stop creating .metadata file since we already have .metadata-v2 file to
track the information for the origin directory. Therefore, this patch only stop
create, write, and read the .metadata file. And, leaving the work for removing
it to the next minor upgrade.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 14:13:27 +00:00
Tom Tung
a3f0aa60d4 Bug 1514600 - P1 - Notify LS to cleanup the gUsages while storage initialization fails; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D27502

--HG--
extra : moz-landing-system : lando
2019-04-29 10:49:58 +00:00
Jan Varga
9edddb4ade Bug 1535371 - QM: Treat origins containg the '^' character as invalid; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31428
2019-05-16 15:05:38 +02:00
Andrea Marchesini
dc7545548e Bug 1551055 - StoragePrincipal should be supported by localStorage - part 1, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D30801

--HG--
extra : moz-landing-system : lando
2019-05-14 05:49:46 +00:00
Jan Varga
eef773ad6c Bug 1549654 - LSNG: Compress specific values during migration; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D30181
2019-05-07 12:54:02 +02:00
Jan Varga
e25844ad71 Bug 1548788 - LSNG: Datastore preparation doesn't have to create new origin directories if they don't exist; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29822
2019-05-03 15:03:54 +02:00
Jan Varga
ea67826b85 Bug 1547688 - LSNG: Preloading can use gUsages hash table to quickly finish if there's nothing to preload; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29194
2019-04-29 14:23:55 +02:00