Commit Graph

573 Commits

Author SHA1 Message Date
Tom Tung
ae337a57a0 Bug 1529301 - P0 - Change some code to align the clang format; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D24226

--HG--
extra : moz-landing-system : lando
2019-03-21 08:53:48 +00:00
Noemi Erli
aa85256b6f Backed out changeset d3a8789d7d84 (bug 1529122) for causing failures in browser_forgetAPI_quota_clearStoragesForPrincipal.js CLOSED TREE 2019-03-22 00:50:41 +02:00
Tom Tung
ffb9d8c55b Bug 1529122 - P1 - Remove the origin directory if the requesting client is the only client in the directroy; r=asuth
This patch do:
- Removing the directroy if the requesting client is the only client.
- Avoid unnecessary initialization for a client if it hasn't been initialized.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 17:18:23 +00:00
Tom Tung
e51da80607 Bug 1423917 - P10 - Remove .tmp file in idb drectories in the 2_1to2_2 upgrade; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D21733

--HG--
extra : moz-landing-system : lando
2019-03-20 13:32:49 +00:00
Tom Tung
3b352c7bbf Bug 1423917 - P9 - Remove asmjs client in the 2_1to2_2 upgrade for QuotaManager; r=luke
Differential Revision: https://phabricator.services.mozilla.com/D21732

--HG--
extra : moz-landing-system : lando
2019-03-13 15:59:34 +00:00
Tom Tung
2019dc0bc0 Bug 1423917 - P7 - Ignore invalid origin files during upgrading; r=asuth
After this patch, invalid origin shouldn't block upgrade anymore. However, we
should be aware of that if an invild origin somehow can be recoverd to a valid
origin, then upgrade that origin is required.

Depends on D21730

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

--HG--
extra : moz-landing-system : lando
2019-03-20 13:32:47 +00:00
Tom Tung
9fd3c80fee Bug 1423917 - P6 - Having a test to verify the version2_1To2_2 upgrade removes obsolete origins and isn't blocked by an invalid origin; r=asuth
Depends on D21729

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

--HG--
extra : moz-landing-system : lando
2019-03-20 13:32:45 +00:00
Tom Tung
980e24c534 Bug 1423917 - P5 - Introduce a minor upgrade on QuotaManager to clean obsolete origins; r=asuth
Depends on D21728

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

--HG--
extra : moz-landing-system : lando
2019-03-20 13:31:10 +00:00
Tom Tung
a613e82953 Bug 1423917 - P4 - Support moz-safe-about://home in OriginParser and make it obsolete; r=asuth
Depends on D21727

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

--HG--
extra : moz-landing-system : lando
2019-03-20 13:30:18 +00:00
Tom Tung
196b08be67 Bug 1423917 - P3 - Teach the OriginParser "chrome" origin; r=asuth
This patch makes OriginParser only treats "chrome" origin as a valid origin.
For the rest kinds of origins with chrome schema, the OriginParser would just
treat them as obsolete origins.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 13:28:55 +00:00
Jan Varga
44461f8eff Bug 1535221 - Add more robust logging including more detailed logging for CheckClosingDatastore and DirectoryOpenPending state; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D24423
2019-03-21 21:08:00 +01:00
Jan Varga
9db88adebf Bug 1535995 - Check that group information is up to date; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D23822
2019-03-18 07:14:26 +01:00
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Jan Varga
74ae8758bd Bug 1533741 - Bustages on "ActorsParent.cpp" when Gecko 67 merges to beta on 2019-03-11; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D22720
2019-03-08 16:28:52 +01:00
Jan Varga
977e7c62d6 Bug 1526891 - Part 18: Remove main thread use from StorageOperationBase; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20927
2019-02-23 17:41:23 +01:00
Jan Varga
93fc3f1b66 Bug 1526891 - Part 17: Remove initialization on main thread from quota request parent actors; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20926
2019-02-23 17:39:49 +01:00
Jan Varga
d4e6cf1df0 Bug 1526891 - Part 16: Verify principalInfo before creating any parent actors; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20925
2019-02-23 17:37:25 +01:00
Jan Varga
c5284f4f76 Bug 1526891 - Part 15: Remove CreateRunnable; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20924
2019-02-23 17:33:55 +01:00
Jan Varga
9f3b0b46c4 Bug 1526891 - Part 14: Move storage service initialization to InitializeQuotaManager; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20923
2019-02-23 17:32:26 +01:00
Jan Varga
f8372b6b8d Bug 1526891 - Part 13: Send an async IPC message instead of dispatching a runnable to the PBackground thread when shutting down quota manager; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20922
2019-02-23 17:30:41 +01:00
Jan Varga
64174bb9d6 Bug 1526891 - Part 12: Merge ShutdownObserver with Observer; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20921
2019-02-23 17:28:10 +01:00
Jan Varga
863112a0eb Bug 1526891 - Part 11: Initiate asynchronous deletion of unreferenced files in IDB databases directly on the PBackground thread instead of going through the main thread; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20920
2019-02-23 17:25:48 +01:00
Jan Varga
a95b087aa8 Bug 1526891 - Part 9: Send an async IPC message instead of dispatching a runnable to the PBackground thread when aborting operations for process; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20918
2019-02-23 17:17:21 +01:00
Jan Varga
0fc1e10cf2 Bug 1526891 - Part 8: Move pref initialization to InitializeQuotaManager; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20917
2019-02-23 17:16:08 +01:00
Jan Varga
8815209a79 Bug 1526891 - Part 7: Move base dir path initialization to a profile observer; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20916
2019-02-23 17:12:09 +01:00
Jan Varga
39748c637d Bug 1526891 - Part 6: Introduce InitializeQuotaManager and call it in nsLayoutStatics::Initialize; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20915
2019-02-23 17:08:42 +01:00
Jan Varga
6b68f4dc07 Bug 1526891 - Part 5: Allow calling NextGenLocalStorageEnabled on any thread in the parent process; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20914
2019-02-23 17:06:40 +01:00
Jan Varga
105d16dc03 Bug 1526891 - Part 3: Get origin and base domain strings using MozURL for all URIs; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20912
2019-02-23 17:01:22 +01:00
Jan Varga
ecbb521e47 Bug 1526891 - Part 1: Change handling of indexeddb:// from simple URI to standard URL; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D20905
2019-02-23 04:20:29 +01:00
Jan Varga
383bad7c55 Bug 1517089 - Part 16: Implement QuotaManager::GetInfoFromValidatedPrincipalInfo; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19213
2019-02-08 21:02:23 +01:00
Jan Varga
b359db62fd Bug 1517089 - Part 15: Remove a hack for JetPack and DevTools fron QuotaManager:GetInfoFromPrincipal; r=asuth
The special case is now handled in GetSpecialBaseDomain in ContentPrincipal.cpp

Differential Revision: https://phabricator.services.mozilla.com/D19212
2019-02-08 21:02:19 +01:00
Jan Varga
61bb94bcb8 Bug 1517089 - Part 10: Implement QuotaManager::IsPrincipalInfoValid; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19204
2019-02-08 21:01:59 +01:00
Jan Varga
5302b36c41 Bug 1517089 - Part 5: Move storage service initialization to InitializeLocalStorage; r=asuth 2019-02-07 19:51:22 +01:00
Ehsan Akhgari
faecb1030e Bug 1525054 - Make ContentPermissionRequestBase calculate the isHandlingUserInput flag itself instead of relying on callers who may or may not pass in the correct information; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D18571

--HG--
extra : moz-landing-system : lando
2019-02-04 19:56:48 +00:00
Tom Tung
15907fc6e1 Bug 1519822 - Support IPv6 URL on OriginParser; r=asuth
The supporting format for IPv6 URL based on
https://url.spec.whatwg.org/#host-representation

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

--HG--
extra : moz-landing-system : lando
2019-02-01 13:04:14 +00:00
Tom Tung
834069f95a Bug 1423917 - P2 - Have a test to verify a set of hidden files don't block QuotaManager's initialization and getting usauge; r=asuth
--HG--
extra : rebase_source : 35419082ee854b3e69f383f7fcfb3b6a91b7573f
2018-10-19 15:40:07 +02:00
Tom Tung
2a60c08e55 Bug 1423917 - P1 - Ignore dot files in QM and add .desktop, Desktop.ini, desktop.ini, Thumbs.db into the list of OSMetadata; r=asuth
This patch mainly whitelist all the dot-files in the persistence directories and
origin directories. Ignore dot-files was first proposed in
Bug 944918 comment 39. ".desktop" was also mentioned in that comment Besides,
"desktop.ini" was first mentioned in Bug 944918 comment 42, "Thumbs.db" was
mentioned in 1493262 comment 11, and "Desktop.ini" was first mentioned
Bug 1423917 comment 46.Thus, this patch also whitelist them all during
initialization.

--HG--
extra : rebase_source : 6dc372c7e4bfc6dbe9774b5a9c72b95d20b7bea9
2018-09-20 14:54:42 +02:00
Tom Tung
698bbba539 Bug 1521017 - Using NS_NAMED_LITERNAL_CSTRING to avoid increasing the number of static constructors; r=asuth
This patch uses nsLiteralCString instead of nsCString for avoiding increasing
the number of static constructors. Also, it removes the declaration of
kInternalError and kExternalError on Beta and Release since they won't be use
in these channels.

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

--HG--
extra : moz-landing-system : lando
2019-01-18 22:52:06 +00: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
Tom Tung
a4b7f90f3f Bug 1436188 - Add telemetry probes to collect the number of failures during the QuotaManager initialization; r=asuth, data-review=chutten
This patch uses categorical keyed Historgram to collect data. While the key is
used to determine whether is it an external error or an internal error (Note:
the external error is referred to low level failure, for example: database
corrupt, OS API errors, ... etc; the internal error is referred to errors, like:
not handle file properly, unexpected filenames, ... etc), the labels for
categorical indicates where the error happens.
Furthermore, this patch make QuotaManager keep traversing the profile even if
an error happens so that we can get more information in the telemetry data.
Please note that these things should only happen in the Nightly Channel.

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

--HG--
extra : moz-landing-system : lando
2019-01-17 17:12:27 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Alex Gaynor
55e3f21b2b Bug 1515437 - mark several IPC methods as final; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15011

--HG--
extra : moz-landing-system : lando
2018-12-19 21:46:49 +00:00
Mark Banner
8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Ciure Andrei
ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner
8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

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

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan Varga
d4d5f86d82 Bug 1286798 - Part 49: Add clearStoragesForPattern() method to the quota manager service; r=asuth 2018-11-29 21:49:52 +01:00
Jan Varga
6714997188 Bug 1286798 - Part 48: Add ParseOrigin() method to the quota manager; r=asuth 2018-11-29 21:49:49 +01:00
Jan Varga
9c1d177a11 Bug 1286798 - Part 47: Add AboutToClearOrigins() method to the quota client interface; r=asuth 2018-11-29 21:49:46 +01:00
Jan Varga
0649224345 Bug 1286798 - Part 26: Implement a lazy data migration from old webappsstore.sqlite; r=asuth,janv
This patch was enhanced by asuth to bind attached database path.
Places has shown that argument binding is necessary.  (Profiles may include usernames in their path which can have cool emoji and such.)
2018-11-29 21:48:38 +01:00
Jan Varga
7981be440b Bug 1286798 - Part 25: Add checks for the group and global limit; r=asuth 2018-11-29 21:48:34 +01:00
Jan Varga
480f7ccea1 Bug 1286798 - Part 24: A new exclusive directory lock shouldn't invalidate existing internal directory locks; r=asuth
This fixes an intermittent failure when multiple clearStoragesForPrincipal() are called at the same time.
2018-11-29 21:48:31 +01:00
Jan Varga
6e40a9dccb Bug 1286798 - Part 22: Add support for preloading of datastores; r=asuth
Datastores are preloaded only for content principals. The preloading is triggered as soon as possible to lower the chance of blocking the main thread in content process. If there is no physical database on disk for given origin, datastore is not created. Preloaded datastores are kept alive for 20 seconds.
2018-11-29 21:48:25 +01:00
Jan Varga
b968ceb813 Bug 1286798 - Part 18: Verify that data is persisted on disk; r=asuth,mrbkap
New methods open() and close() are added to the Storage WebIDL interface. They are only available when a pref is set and are only intended for testing. There's also a new method resetStoragesForPrincipal() which is used as a callback for close() since datastores don't release directory locks immediately. resetStoragesForPrincipal() requests an exclusive lock for given origin, so it must wait for any exising shared locks to be released.
2018-11-29 21:48:11 +01:00
Jan Varga
709a73dabf Bug 1286798 - Part 14: Enhance clearStoragesForPrincipal() to support clearing of storages for specific quota client; r=asuth
See also bug 1402254, original patch by baku.
2018-11-29 21:47:58 +01:00
Jan Varga
a47c296511 Bug 1286798 - Part 7: Teach QuotaManager's OriginParser to handle file://UNIVERSAL_FILE_URI_ORIGIN; r=asuth
See bug 1340710 which introduced this kind of URI.
2018-11-29 21:47:34 +01:00
Jan Varga
c934ad618d Bug 1286798 - Part 6: Fix a dead lock in the single process case; r=asuth,janv
Expose the nested main event target, so it can be used in the single process case by the parent side to process runnables which need to run on the main thread.
After this change we don't have use hacks like getting profile directory path on the child side and sending it to the parent. The parent side can now do it freely even in the single process case.

This patch was enhanced by asuth to not tunnel the nested main event target through IPC.
2018-11-29 21:47:30 +01:00
Jan Varga
c5676a58c7 Bug 1286798 - Part 5: More integration with QuotaManager; r=asuth
Preparation of datastores now creates real database files on disk. The LocalStorage directory is protected by a directory lock.
Infrastructure for database schema upgrades is in place too.
Database actors are now explicitely tracked by the datastore. When the last actor finishes the directory lock is released.
Added also implementation for QuotaClient::GetUsageForOrigin() and QuotaClient::AbortOperations().
2018-11-29 21:47:27 +01:00
Jan Varga
9f71846e2a Bug 1286798 - Part 4: Basic integration with QuotaManager; r=asuth
This adds a new quota client implementation, but only implements ShutdownWorkThreads.
At shutdown we wait for all running operations to finish including database actors which are closed by using an extra IPC message which avoids races between the parent and child.
Databases are dropped on the child side as soon as they are not used (e.g. after unlinking by the cycle collector).
2018-11-29 21:47:24 +01:00
Boris Zbarsky
64ae41821b Bug 1507540 part 6. Make nsIVariant's "type" a notxpcom attribute. r=froydnj 2018-11-19 20:20:05 -05:00
Ehsan Akhgari
d8c3c5a17d Bug 1506014 - Refactor some of the common code in the implementations of nsIContentPermissionRequest into a common base class r=baku
Differential Revision: https://phabricator.services.mozilla.com/D11488

--HG--
extra : moz-landing-system : lando
2018-11-14 05:33:25 +00:00
prathiksha
7a42d37605 Bug 1459603 - Remove the checkbox from the persistent storage notification. r=johannh
Remove the checkbox from the persistent storage notification.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 08:15:05 +00:00
Julian Descottes
079a123093 Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 13:48:48 +00:00
Csoregi Natalia
faba2c8c15 Backed out 4 changesets (bug 1467712) for multiple failures with: Too many arguments passed to ok. CLOSED TREE
Backed out changeset 9ce0ac2b9d71 (bug 1467712)
Backed out changeset 026eb1f6dc6e (bug 1467712)
Backed out changeset 0088a09d869a (bug 1467712)
Backed out changeset 1b19ea76aad6 (bug 1467712)
2018-11-01 15:22:52 +02:00
Julian Descottes
b50a5ba4dc Bug 1467712 - Simplify calls to ok to use only 2 arguments;r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D10416

--HG--
extra : moz-landing-system : lando
2018-11-01 11:09:48 +00:00
Ehsan Akhgari
54b2e44577 Bug 1502747 - Remove nsIContentPermissionType.access and all of its supporting code r=snorp,baku
This field was originally added for the b2g-only DeviceStorage API,
and isn't used for anything else right now.

This reverts the remaining parts of bug 1043136 and bug 1043136
as well as some support code for mobile.

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

--HG--
extra : moz-landing-system : lando
2018-10-30 07:48:55 +00:00
Tom Tung
b75ea7ded2 Bug 1395102 - P4 - Reuse the code for MaybeUpgradeClients() in the upgrade helpers; r=janv
This patch moves MaybeUpgradeClients to RepositoryOperationBase class from
UpgradeStorageFrom1_0To2_0Helper and  UpgradeStorageFrom2_0To2_1Helper so that
lines of code can be reused.

--HG--
extra : rebase_source : 1131ed8b01ed91b7bc5b362a7b1aaf15aa681a95
2018-10-19 11:36:08 +02:00
Tom Tung
7e3170879c Bug 1395102 - P3 - Reuse the code for QuotaManager::UpgradeStorageFromxxToxx(); r=janv
This patch adds a new function QM::UpgradeStorage() to reuse lines of code in
QM:UpgradeStorageFrom0_0To1_0(), QM:UpgradeStorageFrom1_0To2_0(), and
QM:UpgradeStorageFrom2_0To2_1().

--HG--
extra : rebase_source : 7b1cba884d375e0609f5c622a798c9c0f8129b90
2018-10-17 15:37:16 +02:00
Tom Tung
29e37afc3d Bug 1395102 - P2 - Rename the intermediate class in P1 to RepositoryOperationBase; r=janv
To do this, it also rename the StorageDirectoryHelper to StorageOperationBase to
align with classes naming. Bsides, this patch renames
RepositoryOperationBase::DoUpgrade() to
RepositoryOperationBase::ProcessRepository().

--HG--
extra : rebase_source : a7f57a6b670e18b88cf3484bfdfd86f98b23e43a
2018-10-17 14:29:55 +02:00
Tom Tung
c2b832e21d Bug 1395102 - P1 - Introduce a intermediate helper class to reuse code for upgrading origin directories; r=janv
This patch mainly create a new helper class and it inherits from
StorageDirectoraryHelper to reuse the code in
CreateOrUpgradeDirectoryMetadataHelper::CreateOrUpgradeMetadataFiles(),
UpgradeStorageFrom0_0To1_0Helper::DoUpgrade(),
UpgradeStorageFrom1_0To2_0Helper::DoUpgrade(),
UpgradeStorageFrom2_0To2_1Helper::DoUpgrade().

--HG--
extra : rebase_source : cace0f54689cb13d42fb797833a13c861750be18
2018-10-18 11:12:28 +02:00
Tom Tung
4baf9ffe10 Bug 1481716 - Add a telemetry probe to track how long does the QM take for initializing repositories; r=janv, data-review=francois
This patch adds a telemetry probe to track the time for initializing both
the default and the temporary repositories.

--HG--
extra : rebase_source : f879a3bc53c41f209a2a09b322db43d27f9af4f8
2018-08-13 10:34:10 +02:00
Tom Tung
c31875b7c3 Bug 1389380 - Add a test for storage pressure event; r=janv
A storage pressure event should be fired when the current usage is greater than
the global limit. Currently, the QuotaManger checks the usage and the limit in
two different cases, and this test verfiies both cases do fire a storage
pressure event with a correct value of usage. The first one is that a quota
client is asking for writting a new storage into the disk, but it will
make the currnet usage become greater than the global limit. The other one is
that the calculating limit is less than the current usage while initilaizing the
temporary storage.

--HG--
extra : rebase_source : 0ce65ee177175462ac8928f70972699c428a1135
2018-10-04 10:32:41 +02:00
Tom Tung
7aaeb17302 Bug 1389378 - A test for verifying persisted origins bounded by the global limit; r=janv
Bug 1372116 reported that PersistOp() didn't create an originInfo object for the
persisting origin if the temporary storage had been initialized. The test
verifies that no matter the temporary storage was initialized or not the
PersistOp should hanlde the originInfo object properly so that the persisting
origin will be bounded by the global limit.

--HG--
extra : rebase_source : b2bd9553094f03a89cc8e9e733fe6909ade1f430
2018-09-17 11:21:41 +02:00
Tom Tung
8e0aa26fa8 Bug 1495687 - Introduce initTemporaryStorage to nsIQuotaManagerService for testing; r=janv
--HG--
extra : rebase_source : c38521eaf9f9c204971049b959efc5113ae86baa
2018-10-02 16:08:43 +02:00
Tom Tung
f84d16cecf Bug 1389390 - Add a test to verify a persisted origin won't be evicted; r=janv
Bug 1298392 introduced persist() to QuotaManager. This patch intends to verify
that normally the oldest origin will be evicted if the global limit is reached,
but if the oldest origin is persisted, then it won't be evicted.

--HG--
extra : rebase_source : 72fc4cda25545df28cb15bffd9255ba51fe628ab
2018-09-25 17:14:53 +02:00
Jan Varga
c30332cd26 Bug 1493908 - Part 2: Add a test to verify that persisted origins are not constrained by the group limit; r=asuth 2018-09-27 23:25:43 +02:00
Jan Varga
8fd43abb04 Bug 1493908 - Part 1: Add support for using async functions in tests; r=asuth 2018-09-27 23:25:16 +02:00
Kris Maglione
1c20e8cbbb Bug 1486147: Part 2 - Update JS string enumerator callers to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D4270

--HG--
extra : rebase_source : 2adadcc8e51a7bce1da02f4bee1333b77bfa9944
extra : histedit_source : 9df920fd186f8c96a5d8b9cbff53ea9529f26ee0
2018-08-24 16:22:40 -07:00
Jonathan Kingston
71dcfa26fc Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 310e601c80a7d6c76b1ee986a7bfb98786150870
extra : intermediate-source : 43b6b33227f000090d6fb8fc20979a54c814918b
2018-08-29 15:47:29 +01:00
Brindusan Cristian
1db0587c0e Backed out 10 changesets (bug 1485305) for browser-chrome failures on docshell/test/browser/browser_loadURI.js. CLOSED TREE
Backed out changeset 50439ec01661 (bug 1485305)
Backed out changeset a05e40ef7215 (bug 1485305)
Backed out changeset c99b97b4348b (bug 1485305)
Backed out changeset 75220b2f6669 (bug 1485305)
Backed out changeset e698f2fc1c1a (bug 1485305)
Backed out changeset acce14683c13 (bug 1485305)
Backed out changeset 323773a395cc (bug 1485305)
Backed out changeset 1b74152cabc1 (bug 1485305)
Backed out changeset 4b5c9d5929fc (bug 1485305)
Backed out changeset 238d92348159 (bug 1485305)
2018-09-19 18:47:27 +03:00
Jonathan Kingston
b4e3ef054c Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 546a2e9c719c4162e26ea216148ac0a3ca2ef9ac
2018-08-29 15:47:29 +01:00
arthur.iakab
d2e647e133 Backed out 10 changesets (bug 1485305)for failing browser chrome tests on browser_loadDisallowInherit.js
Backed out changeset 138b8596a9cd (bug 1485305)
Backed out changeset d9f04aeeeef7 (bug 1485305)
Backed out changeset cd063d8afe4e (bug 1485305)
Backed out changeset 2f8a5a03ccb5 (bug 1485305)
Backed out changeset 8085d1eefd7c (bug 1485305)
Backed out changeset 3aaccb374a59 (bug 1485305)
Backed out changeset 3a111e9e5c9c (bug 1485305)
Backed out changeset 61aa1cfb0b01 (bug 1485305)
Backed out changeset bca973d90acc (bug 1485305)
Backed out changeset 4eb33bf25d6f (bug 1485305)
2018-09-18 20:30:07 +03:00
Jonathan Kingston
1008c25689 Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : 68ea8072f3c7967ede482e9a087a588a0008df35
2018-08-29 15:47:29 +01:00
Tiberius Oros
3235f6720f Backed out 10 changesets (bug 1485305) for failures at browser/content/browser.js on a CLOSED TREE
Backed out changeset 63c50fd60ae4 (bug 1485305)
Backed out changeset bf0f2adb765e (bug 1485305)
Backed out changeset 721871bb64f1 (bug 1485305)
Backed out changeset e9da73786c5f (bug 1485305)
Backed out changeset e02038177b6b (bug 1485305)
Backed out changeset 35bd32f99f60 (bug 1485305)
Backed out changeset f40900bf8621 (bug 1485305)
Backed out changeset 03632075ac2c (bug 1485305)
Backed out changeset 2fee48378f73 (bug 1485305)
Backed out changeset 6263695b3cb8 (bug 1485305)
2018-09-18 14:46:54 +03:00
Jonathan Kingston
c9dd3d1bdb Bug 1485305 - dom/ Ensure loadURI always passes a triggeringPrincipal() r=Nika
Differential Revision: https://phabricator.services.mozilla.com/D4557

--HG--
extra : source : b55b6968de5a1c12e459a4e07a69ca5f46e5b1a1
2018-08-29 15:47:29 +01:00
Jan Varga
422e07e11f Bug 1324836 - Part 2: Add a gtest for OriginScope testing; r=asuth
Original patch by Tom Tung [:tt].
2018-09-07 18:23:02 +02:00
Jan Varga
d138057009 Bug 1324836 - Part 1: Make OriginScope use mozilla::Variant; r=asuth
Original patch by Tom Tung [:tt].
2018-09-07 18:22:50 +02:00
Tom Tung
317807031a Bug 1485971 - Followup for enabling test on Beta and Release for bug 1482812; r=janv
Bug 1482812 enabled the check for whether origin is valid in both Beta and
Release channels, but it didn't enable the test under the quota folder. That
test verified the check does work while executing storage.persist() if the
origin hasn't been initialized yet. Thus, this patch removes the pref to verify
this check does work for storage.persist() on Beta and the Release channels.

--HG--
extra : rebase_source : c454c57189fbc0557e9c83783adce5efb40304a7
2018-08-24 15:16:26 +02:00
Kris Maglione
65c28aa0ad Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.

This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.

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

--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
2018-08-18 14:22:47 -07:00
Henri Sivonen
641c6f0580 Bug 1485320 - Use SetLength() instead of GetMutableData() throwing away the pointer in MemoryOutputStream::Create(). r=asuth
MozReview-Commit-ID: zZmGlE30kz

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

--HG--
extra : moz-landing-system : lando
2018-08-22 11:32:41 +00:00
Jan Varga
80990b5552 Bug 1361330 - Part 6: Gate SimpleDB behind a preference; r=asuth 2018-08-20 14:33:17 +02:00
Jan Varga
e7d1daf164 Bug 1361330 - Part 5: Automatic tests for simpledb; r=asuth 2018-08-20 14:33:10 +02:00
Jan Varga
5733cbbbd3 Bug 1361330 - Part 4: Core implementation; r=asuth 2018-08-20 14:33:03 +02:00
Jan Varga
b277f1385d Bug 1361330 - Part 2: Move MemoryOutputStream to a generic place; r=asuth 2018-08-20 14:32:48 +02:00
Jan Varga
60713ff421 Bug 1361330 - Part 1: Make quota stream constructors public and move the Create() helpers outside of the stream classes; r=asuth 2018-08-20 14:32:33 +02:00
Tom Tung
5b3f5f96b1 Bug 1482812: Patch for turning on the origin parser check on both beta and release. r=janv
This patch, basically, turns the check. To avoid checking the same direcotries
multiple time, it creates a member hashtable |mValidOrigins| in QuotaManager and
use it in EnsureOriginDirectory(). Since it needs to use the member hashtable,
this patch also moves EnsureOriginDirectory() to become a QuotaManager member
function.

--HG--
extra : rebase_source : 170f749b07ca955e1dc41a627d339709381ffcad
2018-08-15 16:59:26 +02:00
Hiroyuki Ikezoe
330f831cb7 Bug 1482753 - Move battery/Types.h into hal/ and BatteryObserver into hal namespace. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D3180

--HG--
rename : dom/battery/Types.h => hal/HalBatteryInformation.h
2018-08-13 10:57:50 +09:00
Jonathan Kingston
2f0987a202 Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb r?=gijs
Summary: Depends on D2046

Reviewers: ckerschb!, Gijs!

Tags: #secure-revision

Bug #: 1362034

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

--HG--
extra : source : 33884d05cc94463950b31fab1fd2f37ada9becef
extra : intermediate-source : 72471adb75d5ec3dc2b0c8f972a6f1f26bfd3ae2
extra : histedit_source : f384cbab58401575afc3443c9a431b73cff806d4
2018-07-06 21:16:29 +01:00
Tom Tung
8c51efc4db Bug 1481753: Remove redundant lines for flipping the flag and checking the storage limits. r=janv
Tags: #secure-revision

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

--HG--
extra : rebase_source : c2cce729d205dc61ce41b9540db1784813dc44c1
2018-08-08 15:43:46 +02:00
dvarga
12f19b94e9 Backed out 2 changesets (bug 1362034) for failure at browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js on a CLOSED TREE
Backed out changeset 1c3329958b8a (bug 1362034)
Backed out changeset f68b1b76af36 (bug 1362034)

--HG--
extra : histedit_source : 6169c5ffe856266d3bc8b2ca32f4b67054c71bbe
2018-08-08 22:11:56 +03:00
Jonathan Kingston
c15f69d427 Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb,Gijs
Summary: Depends on D2046

Reviewers: ckerschb, Gijs

Reviewed By: ckerschb, Gijs

Bug #: 1362034

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

--HG--
extra : rebase_source : ccded0f06a0dc4567b827f42ee29f4b8954154fe
extra : amend_source : 94da8ecc053e56958fa4137d7e497362fa2c11f1
2018-08-08 20:05:30 +03:00
Andreea Pavel
f5c1119983 Backed out 2 changesets (bug 1362034) for failing damp | inspector/cold-open.js on a CLOSED TREE
Backed out changeset 8c8925b75aa2 (bug 1362034)
Backed out changeset ff6b05c96094 (bug 1362034)
2018-08-06 20:42:44 +03:00
Jonathan Kingston
4ca581ffed Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb,Gijs
Summary: Depends on D2046

Reviewers: ckerschb, Gijs

Reviewed By: ckerschb, Gijs

Bug #: 1362034

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

--HG--
extra : rebase_source : 4bb9e7feb0704239756e6e38623c0fea81669f7b
extra : amend_source : 9417f96547735fbdc55ea23666327a5cb86ac92f
2018-08-06 19:56:37 +03:00
Chris Pearce
4a6ff21ab5 Bug 1473671 - Don't store persistent block permission if ESC pressed while showing permission doorhanger. r=florian
While showing a doorhanger permisison prompt, if the user presses the ESC key
we call the secondary action callback, passing in whether any checkbox on
the popup notification was checked.

In the case of an autoplay-media permission prompt, we have a "remember"
checkbox, which is checked by default. So pressing ESC means the user will
remember a "block" result for the current site.

We believe that users don't expect pressing ESC to result in a remembered
decision, they expect pressing ESC to avoid making a decision. So we want to
ignore the checkbox when ESC is pressed for autoplay-media.

So this patch adds a new PopupNotification behaviour which reports the source
of event which caused the action callback to be called. This enables the ESC
key press to ignore storing a permission.

Note: the change here to not store a permission on ESC press applies to all
permissions, not just autoplay-media.


MozReview-Commit-ID: IUWFN8LG9VF

--HG--
extra : rebase_source : b004bc211177a7bfb6dcea563d75db9a6750b214
2018-07-17 14:45:17 +12:00
Andrea Marchesini
bc5414c5f3 Bug 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
Chris Peterson
9513c25210 Bug 1473453 - Part 2: QuotaManager: disambiguate null check of bool pointer. r=janv
Fix clang-tidy warning about bool pointers:

[misc-bool-pointer-implicit-conversion] dom/quota/ActorsParent.cpp:4168:7: warning: dubious check of 'bool *' against 'nullptr', did you mean to dereference it?

MozReview-Commit-ID: C6QdeJlf71C

--HG--
extra : rebase_source : cb2e19e41bed6cc1456e89acce65747558306bcf
2018-07-04 14:46:51 -07:00
Jan Varga
75397467ef Bug 1470811 - Update FF 62 to know about upcoming new quota client; r=asuth 2018-06-29 09:58:09 +02:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Kris Maglione
6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Boris Zbarsky
914f11a6d2 Bug 1455674 part 10. Remove nsIDOMElement use from remaining dom/ xpidl files. r=qdot 2018-04-26 23:36:10 -04:00
Andrea Marchesini
e8bc84f98b Bug 1252998 - StorageActivityService - part 7 - StorageActivityService in QuotaManager, r=janv 2018-04-18 18:19:13 +02:00
Jeff Walden
821db93ccc Bug 1453456 - Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj
--HG--
extra : rebase_source : b31986c0e6828be79442cfb0cf369eb80c232139
2018-04-12 20:19:30 -07:00
Michael Kohler
4c381de5f6 Bug 1428306 - Remove browser.storageManager.enabled pref r=baku,johannh
MozReview-Commit-ID: GodyYuGxVD

--HG--
extra : rebase_source : 0ba78e764ea2c77ecaafcd35a502940ea1a37ac2
2018-04-09 20:46:45 +02:00
Peter Van der Beken
9cab86f20d Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 2: Various test fixes to prepare for using WebIDL bindings for MessageManager classes. r=bz.
--HG--
extra : rebase_source : cbf2c71a956a0c57e7d57a1c1c132bb57bc48c37
2017-07-04 18:03:18 +02:00
Andrea Marchesini
5784769019 Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
Sebastian Hengst
3a10644021 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)

--HG--
extra : histedit_source : 791b22f6770f4fead2f909478a93d65d85829fe0%2Cbb387309e90f53e1dde45dcf8cf4ebedcc6e5c5e
2018-03-01 11:51:09 +02:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Peter Van der Beken
e0424a7bae Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 2: Various test fixes to prepare for using WebIDL bindings for MessageManager classes. r=bz.
--HG--
extra : rebase_source : a07b1490df5f1a55121d01c0f9bb9fd20c890091
2017-07-04 18:03:18 +02:00
Johann Hofmann
23a0a82554 Bug 1431029 - Expose timestamp for quota managed storage. r=asuth
MozReview-Commit-ID: 7MNd2m2Jp46

--HG--
extra : rebase_source : 4a17e0b6b38073fea7b4b3d3b4483d4c495b3950
2018-02-20 14:54:17 +01:00
Boris Zbarsky
9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Andrea Marchesini
8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Andrea Marchesini
26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Andrea Marchesini
01fd1fc62e Bug 1419771 - Introduce DOMPrefs, a thread-safe access to preferences for DOM - part 10 - StorageManager enabled, r=asuth 2018-01-08 14:05:04 +01:00
Dorel Luca
04e91897cf Backed out 11 changesets (bug 1252998) for faling browser-chrome on browser/base/content/test/sanitize/browser_sanitize-offlineData.js
Backed out changeset a9ec63c01c50 (bug 1252998)
Backed out changeset a3e5299b882a (bug 1252998)
Backed out changeset aa511b206e21 (bug 1252998)
Backed out changeset 5875848a48ab (bug 1252998)
Backed out changeset 7fd2523680d1 (bug 1252998)
Backed out changeset a45e28e573a4 (bug 1252998)
Backed out changeset 92e8cc81b417 (bug 1252998)
Backed out changeset da38d133549e (bug 1252998)
Backed out changeset 5be23a98b47c (bug 1252998)
Backed out changeset 609093736110 (bug 1252998)
Backed out changeset f4955cf6447f (bug 1252998)

--HG--
rename : browser/base/content/test/sanitize/browser_purgehistory_clears_sh.js => browser/base/content/test/general/browser_purgehistory_clears_sh.js
rename : browser/base/content/test/sanitize/browser_sanitize-passwordDisabledHosts.js => browser/base/content/test/general/browser_sanitize-passwordDisabledHosts.js
rename : browser/base/content/test/sanitize/browser_sanitize-sitepermissions.js => browser/base/content/test/general/browser_sanitize-sitepermissions.js
rename : browser/base/content/test/sanitize/browser_sanitize-timespans.js => browser/base/content/test/general/browser_sanitize-timespans.js
rename : browser/base/content/test/sanitize/browser_sanitizeDialog.js => browser/base/content/test/general/browser_sanitizeDialog.js
2018-01-08 11:00:39 +02:00
Andrea Marchesini
4e9d7b6b24 Bug 1252998 - StorageActivityService - part 7 - StorageActivityService in QuotaManager, r=janv 2018-01-08 08:31:38 +01:00
Florian Quèze
22c55eb7b7 Bug 1421992 - Hand written cleanup patch to make tests pass after removing obsolete xpcshell functions. r=Gijs,ochameau a=Aryx 2017-12-21 11:11:57 +01:00
Florian Quèze
0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze
032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Sylvestre Ledru
9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Johann Hofmann
6a1c57c446 Bug 1345424 - Add an isHandlingUserInput attribute to permission requests. r=baku,smaug
MozReview-Commit-ID: 80TXjnxLMuT

--HG--
extra : rebase_source : 42a54afe6cebe9e7c36a7575000fa9c270a63db6
2017-02-20 20:46:39 +01:00
Andrew McCreight
298aa82710 Bug 1412125, part 2 - Fix dom/ mode lines. r=qdot
This was automatically generated by the script modeline.py.

MozReview-Commit-ID: BgulzkGteAL

--HG--
extra : rebase_source : a4b9d16a4c06c4e85d7d85f485221b1e4ebdfede
2017-10-26 15:08:41 -07:00
Kris Maglione
257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.

Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.

The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.


This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.

MozReview-Commit-ID: 9peyG4pRYcr

--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
2017-10-16 21:08:42 -07:00
Shawn Huang
36d942c4bb Backed out changeset 89ffaadaf58b (bug 1389561) for disabling assertion. r=backout a=backout 2017-10-24 19:38:11 +08:00
Andrea Marchesini
132f286741 Bug 1408333 Get rid of nsIIPCBackgroundChildCreateCallback - part 14 - QuotaManager, r=asuth 2017-10-24 12:02:41 +02:00
Nathan Froyd
4f852fdd0c Bug 1410142 - use NS_NewLocalFile in dom/; r=baku
The interface is nicer, and it is probably slightly faster.
2017-10-23 14:22:14 -04:00
Tom Tung
784d146b73 Bug 1373183 - Part 2: Remove the argument for EnsureTemporaryStorageIsInitialized() since it's unnecessary. r=janv
MozReview-Commit-ID: 9sCHI3XEpIj

--HG--
extra : rebase_source : ffc277295f8b4b160223db61a3014d7e7a95b671
2017-08-23 15:56:06 +08:00
Tom Tung
dd96d219b4 Bug 1373183 - Part 1: Only initialize the temporary storage for estimate(). r=janv
To do this, reuse the code for initializing temporay storage in
EnsureOriginIsInitializedInternal(). Thus, create a helper function called
EnsureTemporaryStorageIsInitialized() and call it from both side.

MozReview-Commit-ID: vNQVteoicH

--HG--
extra : rebase_source : bb6101662213b099cbd7974b091c6c5e845b6311
2017-08-23 15:22:47 +08:00
Andrea Marchesini
6626e900f9 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
Sebastian Hengst
66e04dcde6 Backed out changeset 4666cde20909 (bug 1409327) 2017-10-17 22:03:33 +02:00
Andrea Marchesini
d526801916 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-17 20:38:05 +02:00
Andrew Sutherland
048ab28f09 Bug 1404344 - Part 3: Rename QuotaManager tests from 3_0 to 2_1. r=janv
Upgrade the test names from 3.0/3_0 to 2.1/2_1, consistent with the changes
made in part 1.

--HG--
rename : dom/quota/test/unit/test_version3_0upgrade.js => dom/quota/test/unit/test_version2_1upgrade.js
rename : dom/quota/test/unit/version3_0upgrade_profile.zip => dom/quota/test/unit/version2_1upgrade_profile.zip
extra : rebase_source : f0b33f52d9247ed4b14a2debc22551f98b211741
extra : source : efc62fb7fa68968335c605cf54f1d94631bc3b33
2017-10-03 10:03:19 -04:00
Andrew Sutherland
3fcf6eee0f Bug 1404344 - Part 1: Alias QuotaManager schema 3.0 to 2.1. r=janv
To improve the Firefox 57 to 56 downgrade scenario, have 57 and 58
re-number the version 3.0 schema introduced by bug 1290481 to
version 2.1.  Firefox 56's Quota Manager will recognize the minor
schema version and accept the schema from the future.

--HG--
extra : rebase_source : c2458e380966e4f1ec60a6df5f01135231f308fe
extra : source : e895c35e9b4e9dbc6849d40d644af97c028fffcf
2017-10-03 10:02:27 -04:00
Kris Maglione
60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Kris Maglione
3876d40960 Bug 1404198: Part 1 - Add non-virtual constructor for nsIObject(Input|Output)Stream and update existing callers. r=njn
MozReview-Commit-ID: 3eoh6AwDJyz

--HG--
extra : rebase_source : 92b18b6ef07d276cac79ce735ca0b592cffbf87e
2017-10-04 20:06:28 -07:00
Shawn Huang
ed1d5223ad Backed out changeset 20571bff3967 (bug 1389561). r=backout a=backout
MozReview-Commit-ID: 8GLZx2ls2C4

--HG--
extra : amend_source : 0fb28e72650bbebb2e9484987b34510bfe5750f6
extra : transplant_source : %24%8C_MV%D4%FB%A6%10%F1w%3FE%BD%BB9H%FC2%D6
2017-10-12 15:57:41 +08:00
Shawn Huang
e864ce7583 Bug 1389561 - Part 2: Add MOZ_DIAGNOSTIC_ASSERT for mTemporaryStorageInitialized, r=janv 2017-10-11 15:44:16 +08:00