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

1051 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga 572fb1f823 Bug 1731544 - Replace existing ToResult uses with MOZ_TO_RESULT; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D125324
2021-10-10 19:06:36 +00:00
Haiyang Xu 3ec3db4f94 Bug 1731267 - Wrap call to ReadStream::Inner::Close() with MOZ_ALWAYS_SUCCEEDS in ReadStream::Inner::CloseStream(); r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D126377
2021-10-07 09:11:35 +00:00
hxu 55e1e8e14a Bug 1731263 - Add QM_WARNONLY_TRY to some IPC calls in CacheAPI, which might be related to potential shutdown hang; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D126092
2021-10-06 13:59:09 +00:00
Jan Varga 685aa0cc5e Bug 1728267 - Remove implicit ToResult from QM_TRY when no extra argument is passed in dom/cache; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125319
2021-09-24 13:08:30 +00:00
Kagami Sascha Rosylight f07b669434 Bug 1726157 - Add GetStorageAccess to nsIGlobalObject r=asuth,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D123145
2021-09-24 06:06:51 +00:00
Jan Varga b4ef3d074a Bug 1728267 - Remove implicit ToResult from QM_TRY when one extra argument is passed; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125316
2021-09-23 10:16:09 +00:00
Jan Varga 4cc9bf1d18 Bug 1728267 - Remove implicit ToResult from QM_TRY when two extra arguments are passed; r=dom-storage-reviewers,jstutte,jari
Differential Revision: https://phabricator.services.mozilla.com/D125315
2021-09-23 10:16:09 +00:00
Jan Varga eccdb851bb Bug 1728267 - Remove implicit ToResult from QM_WARNONLY_TRY macros; r=dom-storage-reviewers,jstutte,jari
We can use QM_TO_RESULT (instead of MOZ_TO_RESULT) because QM_WARNONLY_TRY
doesn't propagate errors, so no other adjustment is needed.

Differential Revision: https://phabricator.services.mozilla.com/D125314
2021-09-23 10:16:08 +00:00
Marian-Vasile Laza 6f50b58711 Backed out changeset be76cb91e85a (bug 1726157) for causing xpcshell failures on test_ext_cache_api.js. CLOSED TREE 2021-09-23 13:04:56 +03:00
hxu ba25f249eb Bug 1726598 - Remove sFactoryShutdown and sMutex from dom::cache::Manager since they are obselete. r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D125678
2021-09-23 09:04:41 +00:00
Kagami Sascha Rosylight 2094595971 Bug 1726157 - Add GetStorageAccess to nsIGlobalObject r=asuth,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D123145
2021-09-23 08:49:56 +00:00
hxu 2b88f3939c Bug 1727497 - Revert the usage of MOZ_DIAGNOSTIC_ASSERT in CacheStreamControlParent::CloseAll(); r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D125972
2021-09-17 15:27:58 +00:00
hxu 20f4eab01a Bug 1727497 - Add MOZ_ALWAYS_SUCCEEDS when calling dispatch functions during dom/cache shutdown; r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D125071
2021-09-17 14:07:43 +00:00
Jari Jalkanen a97bd4614b Bug 1702594 - Warn about unexpected file ending. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D122990
2021-09-17 13:39:51 +00:00
hxu 5df4ead67c Bug 1727497 - Add MOZ_DIAGNOSTIC_ASSERT in CacheStreamControlParent::CloseAll(); r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D124454
2021-09-09 09:12:59 +00:00
Steve Fink 464ba9c559 Bug 1727374 - Root Init dictionaries to fix rooting hazards. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D123633
2021-09-02 19:06:58 +00:00
hxu 156c39366f Bug 1727710 - Change DirPaddingFile enum to enum class; r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D124315
2021-09-02 12:30:56 +00:00
Jens Stutte e55b9dfeb0 Bug 1588498: Forbid the creation of new cache Context objects during quota manager shutdown. r=dom-storage-reviewers,asuth
We want to enforce the (assumed) invariant that after we started QM shutdown we should not create new contextes and associated threads for cache IO. We do this generating a runtime error, whose handling might not be consistent in all (unexpected) cases, yet. But this is preferable over a shutdown hang crash, for sure.

Differential Revision: https://phabricator.services.mozilla.com/D123137
2021-08-20 05:49:26 +00:00
Kagami Sascha Rosylight 7237431b99 Bug 1723050 - Part 5: Replace typedef by using in dom/cache/ r=janv
Differential Revision: https://phabricator.services.mozilla.com/D121297
2021-08-06 12:10:13 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Mats Palmgren 58a3ef1c19 Bug 1542807 part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets. r=ckerschb
As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts.  The document certainly has no authority
to block those from loading.  (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)

Differential Revision: https://phabricator.services.mozilla.com/D111695
2021-06-14 01:22:06 +00:00
Butkovits Atila ed3da455ae Backed out 7 changesets (bug 1542807) for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE
Backed out changeset e9ef32fa2f2e (bug 1542807)
Backed out changeset 8fa0cb199975 (bug 1542807)
Backed out changeset 38daf64afe59 (bug 1542807)
Backed out changeset e3aee052c495 (bug 1542807)
Backed out changeset a71056d4c7cc (bug 1542807)
Backed out changeset cf91e7d0a37f (bug 1542807)
Backed out changeset eee949e5fd67 (bug 1542807)
2021-06-12 01:38:25 +03:00
Mats Palmgren 2047e29464 Bug 1542807 part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets. r=ckerschb
As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts.  The document certainly has no authority
to block those from loading.  (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)

Differential Revision: https://phabricator.services.mozilla.com/D111695
2021-06-11 18:10:39 +00:00
Jan Varga f4a3bc258f Bug 1711848 - Add argument separation comments for QM_OR_ELSE(WARN|NOTE|LOG_VERBOSE)(_IF) uses; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115465
2021-06-01 13:58:27 +00:00
Jan Varga f7d0092e58 Bug 1711656 - Rename QM_OR_ELSE_LOG to QM_OR_ELSE_LOG_VERBOSE; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115363
2021-06-01 12:12:27 +00:00
Jan Varga 4b6ca76a31 Bug 1708643 - CACHE: Replace QM_TRY(QM_OR_ELSE_WARN(...)) with QM_TRY and a cleanup function in CreateOrMigrateSchema; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D115152
2021-05-30 11:08:03 +00:00
Jan Varga 36569e3da2 Bug 1708643 - CACHE: Replace QM_TRY(QM_OR_ELSE_WARN(...)) with QM_WARNONLY_TRY(...) in MaybeUpdatePaddingFileInternal; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D115151
2021-05-30 11:08:03 +00:00
Jan Varga 2792c72140 Bug 1708643 - CACHE: Replace QM_OR_ELSE_(WARN|LOG) with QM_OR_ELSE_(WARN|LOG)_IF in places where the fallback needs to be called conditionally; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D115150
2021-05-30 11:08:02 +00:00
Jens Stutte 61d67b9ff0 Bug 1706998: Replace QuotaManager::GetRef().MaybeRecordShutdownStep by static QuotaManager::(Safe)MaybeRecordQuotaClientShutdownStep; r=dom-storage-reviewers,janv
There are some few unsafe uses of MaybeRecordShutdownStep where the QuotaManager singleton may be  not (yet or anymore) alive.
In order to not add many unnecessary null checks, we drop GetRef and MaybeRecordShutdownStep in favor of
QuotaManager::MaybeRecordQuotaClientShutdownStep
QuotaManager::SafeMaybeRecordQuotaClientShutdownStep
with the sole difference that the Safe variant runtime checks the singleton, while the normal one only asserts.

Differential Revision: https://phabricator.services.mozilla.com/D115988
2021-05-28 06:46:04 +00:00
Jan Varga cbbe40bbe5 Bug 1711180 - Refactor code for handling STATE_GET_INFO in Context::QuotaInitRunnable::Run; r=dom-storage-reviewers,jstutte
This eliminates the need for using andThen and orElse. This is now consistent
with hanling of STATE_ENSURE_ORIGIN_INITIALIZED.

Differential Revision: https://phabricator.services.mozilla.com/D115127
2021-05-22 06:21:12 +00:00
Jan Varga 3a0f757e45 Bug 1711180 - Replace ordinary orElse with QM_OR_ELSE_WARN in CreateOrMigrateSchema; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115126
2021-05-22 06:21:11 +00:00
Jan Varga e016ebac70 Bug 1711181 - Add explanatory comments for some special uses of QM_OR_ELSE_WARN; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115160
2021-05-21 09:30:30 +00:00
Jan Varga 4f5624297e Bug 1711181 - Use QM_OR_ELSE_LOG in remaining places where QM_OR_ELSE_WARN would spam the reports; r=dom-storage-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D115159
2021-05-21 09:30:30 +00:00
Jan Varga 52086b9801 Bug 1711181 - Change uses of ordinary orElse to QM_OR_ELSE_LOG; r=dom-storage-reviewers,jstutte
This is more consistent with other cases where we either use QM_OR_ELSE_WARN or
QM_OR_ELSE_NOTE. We will later change some uses of QM_OR_ELSE_LOG to
QM_OR_ELSE_LOG_IF. The switch from custom OrElseIf to Result::orElseIf will be
easier when we don't use OrElseIf directly.

This patch only changes uses of ordinary orElse introduced in bug 1701346.

Remaining uses will be handled in bug 1711180 (the ones that were missed in bug
1686191).

Differential Revision: https://phabricator.services.mozilla.com/D115055
2021-05-21 09:30:30 +00:00
Andre Natal e437b1394b Bug 1575625 - Make Cache API available to webextensions (moz-extension:// schemas) r=asuth,rpl
Make Cache API available to webextensions (moz-extension:// schemas)

Differential Revision: https://phabricator.services.mozilla.com/D114054
2021-05-06 19:41:39 +00:00
Paul Bone 6191ca4916 Bug 1709526 - Fix all the lint errors for .ini files in dom/ r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D114321
2021-05-06 01:29:31 +00:00
Jan Varga 09996cc685 Bug 1709067 - CACHE: Remove module specific QM_TRY macros; r=dom-storage-reviewers,jstutte
Depends on D114080

Differential Revision: https://phabricator.services.mozilla.com/D114081
2021-05-03 19:44:39 +00:00
Jan Varga 729a24595d Bug 1701346 - CACHE: Add explanatory comments for some ordinary orElse uses; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D113526
2021-04-28 07:33:55 +00:00
Jan Varga cf5e9e7c32 Bug 1690326 - Follow-up fix for the ERROR_FILE_CORRUPT to NS_ERROR_FILE_FS_CORRUPTED mapping; r=jstutte
The code which depends on the old generic NS_ERROR_MODULE_WIN32 mapping needs
to be updated too.

Depends on D113505

Differential Revision: https://phabricator.services.mozilla.com/D113518
2021-04-28 07:33:54 +00:00
Jan Varga dcb06f6d6d Bug 1706005 - Report failed DirectoryPaddingGet as a warning (instead of an error); r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D113392
2021-04-27 07:12:23 +00:00
Jan Varga 8785c44342 Bug 1701346 - CACHE: Revert QM_OR_ELSE_WARN to ordinary orElse in BodyCreateDir; r=asuth,dom-storage-reviewers,jstutte
Depends on D113068

Differential Revision: https://phabricator.services.mozilla.com/D113069
2021-04-24 08:58:32 +00:00
Jan Varga 1910186fa7 Bug 1701346 - CACHE: Revert QM_OR_ELSE_WARN to ordinary orElse in BodyGetCacheDir; r=asuth,dom-storage-reviewers,jstutte
Depends on D113067

Differential Revision: https://phabricator.services.mozilla.com/D113068
2021-04-24 08:58:31 +00:00
Jan Varga 604404dd23 Bug 1706350 - Follow-up cleanup for bug 1648399; r=dom-storage-reviewers,asuth
This patch addresses remaining review comments from
https://phabricator.services.mozilla.com/D81680.
It also adds missing origin initialization to the tests which was causing
unnecessary warnings during test execution.

Differential Revision: https://phabricator.services.mozilla.com/D112759
2021-04-21 13:55:04 +00:00
Tom Tung abf9f74311 Bug 1655953 - Remove mutex lock for protecting the padding file; r=dom-workers-and-storage-reviewers,sg,asuth,janv
Depends on D81680

Differential Revision: https://phabricator.services.mozilla.com/D85279
2021-04-16 01:09:10 +00:00
Tom Tung f2aee4b5a8 Bug 1648399 - Add test cases to ensure that a cache/ls directory in permanent origin directory shouldn't cause storage init to fail; r=dom-workers-and-storage-reviewers,sg,janv
Depends on D80824

Differential Revision: https://phabricator.services.mozilla.com/D81680
2021-04-16 01:09:10 +00:00
Tom Tung 69065f48aa Bug 1647316 - Align the InitOrigin for Cache with other client's; r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D80823
2021-04-16 01:09:09 +00:00
Jan Varga 7d3ef83b0f Bug 1686191 - Have a way to specifically report warnings around QM_TRY; r=asuth,sg,dom-storage-reviewers
This patch:
- adds QM_WARNONLY_TRY/QM_NOTEONLY_TRY macros
- adds QM_WARNONLY_TRY_UNWRAP/QM_NOTEONLY_TRY_UNWRAP macros
- adds QM_OR_ELSE_WARN/QM_OR_ELSE_NOTE sub macros
- replaces non-propagating uses of NS_WARNING with redundant messages by
  QM_WARNONLY_TRY
- replaces uses of QM_TRY with orElse by QM_TRY(QM_OR_ELSE_WARN(...))
- replaces uses of QM_TRY inside an extra lambda with QM_WARNONLY_TRY
- replaces uses of QM_TRY with QM_VOID with QM_WARNONLY_TRY.
- replaces uses of QM_TRY with unwanted warnings with QM_NOTEONLY_TRY
- replaces uses of QM_TRY with additional Maybe wrapping for doing a
  fallback with QM_TRY(QM_OR_ELSE_WARN(...))

Differential Revision: https://phabricator.services.mozilla.com/D108424
2021-03-24 12:27:53 +00:00
Butkovits Atila 9fc0210ad3 Backed out changeset 2a3316bd2409 (bug 1686191) for causing bustages on QuotaCommon.h. CLOSED TREE 2021-03-24 07:12:55 +02:00
Jan Varga 6edcf204fd Bug 1686191 - Have a way to specifically report warnings around QM_TRY; r=asuth,sg,dom-storage-reviewers
This patch:
- adds QM_WARNONLY_TRY/QM_NOTEONLY_TRY macros
- adds QM_WARNONLY_TRY_UNWRAP/QM_NOTEONLY_TRY_UNWRAP macros
- adds QM_OR_ELSE_WARN/QM_OR_ELSE_NOTE sub macros
- replaces non-propagating uses of NS_WARNING with redundant messages by
  QM_WARNONLY_TRY
- replaces uses of QM_TRY with orElse by QM_TRY(QM_OR_ELSE_WARN(...))
- replaces uses of QM_TRY inside an extra lambda with QM_WARNONLY_TRY
- replaces uses of QM_TRY with QM_VOID with QM_WARNONLY_TRY.
- replaces uses of QM_TRY with unwanted warnings with QM_NOTEONLY_TRY
- replaces uses of QM_TRY with additional Maybe wrapping for doing a
  fallback with QM_TRY(QM_OR_ELSE_WARN(...))

Differential Revision: https://phabricator.services.mozilla.com/D108424
2021-03-24 04:40:10 +00:00
Tom Tung 0c0f49c6fd Bug 1687685 - Collect the number of contraint errors when executing vaccum per reason; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D107238
2021-03-19 15:55:50 +00:00
Tom Tung 5f179ce086 Bug 1687685 - Use an empty string as default value for request_integrity rather than NULL; r=dom-storage-reviewers,asuth
We have this issue because:
- We didn't check the returning nsresult after executing "VACUUM".
- The mismatch settings between upgrade code for the column request_integrity
and new table code for the column. (one is allowed to be NULL while the other
isn't)
- We rewrite the entries schema.

What we need to fix here are:
- The 21- schema databases. -> Fixing migration code from 21 to 22 should help.
- The 22+ schema databases. -> Requring a new upgrade code.

An alternative option is that maybe we can allow request_integrity to be NULL on
table entries.

Differential Revision: https://phabricator.services.mozilla.com/D107237
2021-03-19 15:55:50 +00:00
Jan Varga b59182de8d Bug 1697115 - Rationalize QuotaManager::DecreaseUsageForClient arguments; r=dom-storage-reviewers,sg
Note that the method DecreaseUsageForOrigin has been renamed to
DecreaseUsageForClient.

Differential Revision: https://phabricator.services.mozilla.com/D107615
2021-03-17 06:56:39 +00:00
Simon Giesecke fbf7a1dad4 Bug 1686191 - Remove module argument from LogError. r=dom-workers-and-storage-reviewers,janv
The module argument in LogError is redundant: the module information can
already be determined from the source file path. Indeed, reporting the module
separately in the telemetry events seems unnecessary. Instead, the relative
path is now reported. This is what the analysis of the telemetry data did
reconstruct anyway.

As a consequence, it's no longer necessary to define module-specific
HandleError functions, and therefore it's also unnecessary to define
module-specific TRY macros. These are retained as simple aliases for now,
but can be removed in a later patch entirely.

This also avoids misuses of a TRY macros in the wrong module, which were
happening a few times before, resulting in confusing output or telemetry
events.

Since Bug 1686191 will add some more TRY macro variants that warn, so
simplifying the module-specific aspects will simplify that task. Furthermore,
this is in preparation of moving the TRY macro extensions to MFBT.

Differential Revision: https://phabricator.services.mozilla.com/D102767
2021-03-12 15:01:21 +00:00
Jan Varga 1cc0ba995e Bug 1686031 - Rename OriginMetadata.h to CommonMetadata.h; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D107608
2021-03-11 05:53:17 +00:00
Chris Peterson 2d4ca059e8 Bug 1691889 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/. r=peterv
The MOZ_MUST_USE macro is defined as clang's and gcc's nonstandard __attribute__((warn_unused_result)). Now that we compile as C++17 by default (bug 1560664), we can replace MOZ_MUST_USE with C++17's standard [[nodiscard]] attribute.

The [[nodiscard]] attribute must precede a function declaration's declaration specifiers (like static, extern, inline, or virtual). The __attribute__((warn_unused_result)) attribute does not have this order restriction.

Differential Revision: https://phabricator.services.mozilla.com/D107355
2021-03-10 08:19:25 +00:00
Tom Tung ffc8c722dc Bug 1654531 - Differentiate caches.match with an empty cache name and caches.match without passing cache name; r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D84505
2021-03-10 07:52:27 +00:00
Jan Varga 52647a0d1e Bug 1686031 - Add mPersistenceType to OriginMetadata; r=dom-storage-reviewers,sg
The existing members of OriginMetadata have been extracted to a parent struct
called PrincipalMetadata. Methods like GetOriginUsage,
GetInfoFromValidatedPrincipalInfo, GetInfoFromPrincipal and GetInfoForChrome
have been changed to take/return PrincipalMetadata instead of OriginMetadata.
Having the persistence type doesn't make sense in those methods because the
origin is not tied to a specific persistence type in context of the methods.

Some places temporarily pass PERSISTENCE_TYPE_INVALID and will be fixed in
following patches.

Differential Revision: https://phabricator.services.mozilla.com/D106400
2021-03-04 18:03:02 +00:00
Jan Varga eeb8cf2781 Bug 1695883 - Add explicit fallible mozStorageTransaction::Start method for starting the transaction; r=dom-storage-reviewers,sg
The new method is mandatory because mozStorageTransaction constructor no longer
starts the transaction. It must be started explicitely.

All consumers have been adjusted, but only dom/quota, dom/indexedDB, dom/cache,
dom/localstorage and dom/storage handle the error. Other components like
netwerk/cache, netwerk/cookie and toolkit/components currently only warn on
failure to start a transaction. Bug 1696129, 1696130 and 1696133 have been
filed for proper handling of transaction start failures in those components.

Differential Revision: https://phabricator.services.mozilla.com/D106893
2021-03-04 04:38:06 +00:00
Jan Varga 117488daa2 Bug 1694231 - Add support for nested mozStorageTransaction using savepoints; r=dom-storage-reviewers,sg
The nesting level is tracked on the storage connection. The thread safety is
ensured by holding a lock while a transaction is being started/commited/rolled
back. For these purposes, the sharedDBMutex has been exposed on
mozIStorageConnection interface and additional helper methods have been added
to the interface as well.

Differential Revision: https://phabricator.services.mozilla.com/D106019
2021-03-03 18:53:14 +00:00
Jan Varga 832c277718 Bug 1686031 - Fold QuotaInfo into OriginMetadata and rename QuotaInfo.h to OriginMetadata.h; r=dom-storage-reviewers,sg
Existing uses of OriginMetadata (with only mGroup and mOrigin) have been
adapted and they now always initialize mSuffix to an empty string.
Following patches will change it to real suffix if there's any.

Differential Revision: https://phabricator.services.mozilla.com/D104971
2021-02-12 21:43:42 +00:00
Jan Varga 4323e6df02 Bug 1686031 - Rename GroupAndOrigin to OriginMetadata; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104970
2021-02-12 14:03:28 +00:00
Simon Giesecke d3b3ad3a3d Bug 1690234 - Ignore ERROR_FILE_CORRUPT when calling BodyTraverseFiles from within CollectEachFile/ReduceUsageInfo. r=dom-workers-and-storage-reviewers,janv,asuth
Differential Revision: https://phabricator.services.mozilla.com/D103785
2021-02-12 09:14:21 +00:00
Nika Layzell 63fd915bfb Bug 1689147 - Part 1: Add extended attribute syntax to IPDL, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103366
2021-02-09 16:50:21 +00:00
Jan Varga 9e117b1b8d Bug 1690025 - Move DirectoryLock class to a separate file; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104154
2021-02-09 10:42:22 +00:00
Butkovits Atila 7ab6339085 Backed out 3 changesets (bug 1690025) for causing failure on Client.h. CLOSED TREE
Backed out changeset 5d5e90d31294 (bug 1690025)
Backed out changeset d2b39aebfad2 (bug 1690025)
Backed out changeset 2684aad61a6b (bug 1690025)
2021-02-09 10:12:28 +02:00
Jan Varga dcca4eaf0c Bug 1690025 - Move DirectoryLock class to a separate file; r=dom-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D104154
2021-02-09 06:52:57 +00:00
smolnar fa581f2aee Bug 1687321 - Fix lint failure in dom/cache/FileUtils.cpp a=lint-fix CLOSED TREE 2021-02-08 15:52:49 +02:00
Simon Giesecke 26725b587f Bug 1687321 - Use GetDirEntryKind instead of IsDirectory when iterating over directory entries in dom/cache. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D103763
2021-02-08 13:15:50 +00:00
Nika Layzell 6720e65c4e Bug 1681529 - Part 11: Avoid using DelayedStart when serialzing the reply from SendOpenStream, r=asuth
Streams serialized with the default nsIInputStream serializer will be serialized
with delayedStart, meaning that when sent from the parent process to the content
process it will be serialized as a RemoteLazyInputStream.

In the specific case of SendOpenStream this causes issues, as the content
process code depends on the synchronous nature of nsIFileInputStream to allow it
to be wrapped in a SnappyUncompressInputStream, which requires a sync stream.

Relying on this property is not generally correct and only works because we know
only nsFileInputStream will be sent by the parent process. Other types of sync
streams may be received as async if they are sufficiently large, such as
nsStringInputStream.

Differential Revision: https://phabricator.services.mozilla.com/D103227
2021-02-04 18:13:22 +00:00
Simon Giesecke c1c05c7017 Bug 1690291 - Handle NS_ERROR_STORAGE_IOERR when opening a database like NS_ERROR_FILE_CORRUPTED. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D103898
2021-02-04 11:43:22 +00:00
Bogdan Tara abc7c8eeee Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE
Backed out changeset c87d0f32d7a6 (bug 1681529)
Backed out changeset b1269f35d525 (bug 1681529)
Backed out changeset 29df8d4c984a (bug 1681529)
Backed out changeset 4def7578ced0 (bug 1681529)
Backed out changeset ce57c5a26c25 (bug 1681529)
Backed out changeset 78b186ec645a (bug 1681529)
Backed out changeset b1d1550a66ca (bug 1681529)
Backed out changeset e8620622208a (bug 1681529)
Backed out changeset 636b1a7c13e4 (bug 1681529)
Backed out changeset a5a8eac68b87 (bug 1681529)
Backed out changeset 968e17db71df (bug 1681529)
2021-02-03 09:29:38 +02:00
Nika Layzell b245b926b3 Bug 1681529 - Part 11: Avoid using DelayedStart when serialzing the reply from SendOpenStream, r=asuth
Streams serialized with the default nsIInputStream serializer will be serialized
with delayedStart, meaning that when sent from the parent process to the content
process it will be serialized as a RemoteLazyInputStream.

In the specific case of SendOpenStream this causes issues, as the content
process code depends on the synchronous nature of nsIFileInputStream to allow it
to be wrapped in a SnappyUncompressInputStream, which requires a sync stream.

Relying on this property is not generally correct and only works because we know
only nsFileInputStream will be sent by the parent process. Other types of sync
streams may be received as async if they are sufficiently large, such as
nsStringInputStream.

Differential Revision: https://phabricator.services.mozilla.com/D103227
2021-02-02 23:26:46 +00:00
Brindusan Cristian cbdb020883 Backed out 11 changesets (bug 1681529) for mochitest failures at test_reload_large_postdata.html. CLOSED TREE
Backed out changeset f1f988155c82 (bug 1681529)
Backed out changeset f0ba367de05e (bug 1681529)
Backed out changeset dbea9952ec79 (bug 1681529)
Backed out changeset 6e185ec2c4a4 (bug 1681529)
Backed out changeset d0b11c08666a (bug 1681529)
Backed out changeset f2515096b378 (bug 1681529)
Backed out changeset ecd8c3b8fdb4 (bug 1681529)
Backed out changeset 7ea2e9cc8bad (bug 1681529)
Backed out changeset dbc85d0bffaf (bug 1681529)
Backed out changeset f0893f544219 (bug 1681529)
Backed out changeset 91979e21aa8e (bug 1681529)
2021-02-02 22:02:59 +02:00
Nika Layzell 681cd1b0fe Bug 1681529 - Part 11: Avoid using DelayedStart when serialzing the reply from SendOpenStream, r=asuth
Streams serialized with the default nsIInputStream serializer will be serialized
with delayedStart, meaning that when sent from the parent process to the content
process it will be serialized as a RemoteLazyInputStream.

In the specific case of SendOpenStream this causes issues, as the content
process code depends on the synchronous nature of nsIFileInputStream to allow it
to be wrapped in a SnappyUncompressInputStream, which requires a sync stream.

Relying on this property is not generally correct and only works because we know
only nsFileInputStream will be sent by the parent process. Other types of sync
streams may be received as async if they are sufficiently large, such as
nsStringInputStream.

Differential Revision: https://phabricator.services.mozilla.com/D103227
2021-02-02 19:19:28 +00:00
Jan Varga a8d359bfc5 Bug 1689293 - Introduce DirectoryLock::Acquire; r=sg
Quota clients instead of doing:
RefPtr<DirectoryLock> pendingDirectoryLock = qm->OpenDirectory(..., listener);

now do:
RefPtr<DirectoryLock> directoryLock = qm->CreateDirectoryLock(...);
directoryLock->Acquire(listener);

Differential Revision: https://phabricator.services.mozilla.com/D103279
2021-02-02 08:20:18 +00:00
Simon Giesecke 09a0eebdd9 Bug 1686749 - Let CreateFile*Stream functions propagate all errors. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101779
2021-01-28 11:12:19 +00:00
Simon Giesecke 4e33445ac3 Bug 1687254 - Skip directory entries that no longer exist in GetBodyUsage. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D102204
2021-01-21 15:33:04 +00:00
Simon Giesecke 294006b424 Bug 1682536 - Use references/NotNull with Listener. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D99786
2021-01-21 11:58:37 +00:00
Simon Giesecke 3d71cff61d Bug 1683828 - Use QM_TRY et al. in DBSchema. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100771
2021-01-20 16:35:48 +00:00
Luca Greco 3ba66d4d86 Bug 1678927 - Expect non http channel in ServiceWorkerScriptCache CompareNetwork::OnStreamComplete. r=asuth,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D100343
2021-01-19 15:27:46 +00:00
Masatoshi Kimura 54c1b8dee1 Bug 1687108 - Remove unused content policy types. r=ckerschb,remote-protocol-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D102083
2021-01-19 09:42:13 +00:00
Simon Giesecke b072bdbb20 Bug 1684838 - Check result of CreateAndExecuteSingleStepStatement in ReadRequest. r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D102185
2021-01-18 12:57:26 +00:00
Simon Giesecke b011d2e6fb Bug 1683828 - Use QM_TRY et al. in QuotaClient. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100770
2021-01-18 08:52:06 +00:00
Simon Giesecke 4d71349bf7 Bug 1683828 - Use QM_TRY et al. in Manager. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100769
2021-01-18 08:49:48 +00:00
Simon Giesecke 31ff3b6a71 Bug 1683828 - Use QM_TRY et al. in CacheStorage. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100768
2021-01-14 16:30:12 +00:00
Simon Giesecke 48bc696200 Bug 1683828 - Use QM_TRY et al. in Cache. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100767
2021-01-14 15:51:47 +00:00
Simon Giesecke c0b5a7fcba Bug 1683828 - Use QM_TRY et al. in Manager and modernize signatures. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100665
2021-01-14 16:09:32 +00:00
Simon Giesecke 2951ef3a35 Bug 1683828 - Use QM_TRY et al. in DBAction and modernize signatures. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100321
2021-01-14 16:42:32 +00:00
Simon Giesecke 731e2bb3f2 Bug 1683828 - Use QM_TRY et al. in FileUtils and modernize signatures. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100320
2021-01-14 16:42:32 +00:00
Simon Giesecke 37d1a8c6b9 Bug 1683828 - Use QM_TRY et al in QueryCache. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100319
2021-01-11 13:35:54 +00:00
Simon Giesecke 37567c5f85 Bug 1685298 - Fix uninitialized variable in non-diagnostic builds. r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D100925
2021-01-11 09:20:25 +00:00
Simon Giesecke aa680355aa Bug 1679540 - Extract CollectEachFile function and use in quota manager and clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D98075
2021-01-05 09:27:18 +00:00
Mihai Alexandru Michis a4520f52a9 Backed out changeset 9ef5f1fe26e8 (bug 1679540) for causing Bug 1683863. a=backout 2020-12-22 17:00:34 +02:00
Simon Giesecke 0a86aba723 Bug 1679540 - Extract CollectEachFile function and use in quota manager and clients. r=dom-workers-and-storage-reviewers,ttung,janv
Differential Revision: https://phabricator.services.mozilla.com/D98075
2020-12-21 18:13:56 +00:00
Simon Giesecke 641ad4b8f6 Bug 1682536 - Use references/NotNull in Manager. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D99776
2020-12-17 16:14:43 +00:00
Simon Giesecke 4756746f18 Bug 1682536 - Use references/NotNull in Context. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D99775
2020-12-15 23:25:30 +00:00
Simon Giesecke 88142da40d Bug 1682536 - Use references/NotNull in CacheWorkerRef. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D99774
2020-12-17 16:14:52 +00:00
Masatoshi Kimura 3424a95ee0 Bug 1682103 - Make nsContentPolicyType a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D99580
2020-12-16 11:36:47 +00:00
Simon Giesecke db8cc251fb Bug 1679987 - Replace strtok for Vary header by nsCCharSeparatedTokenizer and range-based for. r=necko-reviewers,dom-workers-and-storage-reviewers,asuth,valentin
Differential Revision: https://phabricator.services.mozilla.com/D98309
2020-12-16 19:10:41 +00:00