ActorsChild.cpp |
QuotaChild
**************************************************************************** |
6452 |
ActorsChild.h |
|
2731 |
ActorsParent.cpp |
|
304464 |
ActorsParent.h |
|
667 |
ArtificialFailure.cpp |
|
1200 |
ArtificialFailure.h |
Checks if an artificial failure should be triggered based on the specified
category and the configured probability.
This method evaluates if the provided failure category matches the
categories set in the preferences. If a match is found, it then checks
the probability of triggering an artificial failure. A random value is
generated to determine if the failure should occur based on this
probability. If both the category matches and the random value falls within
the defined probability, the method returns an error code indicating the
artificial failure. Otherwise, it returns a successful result.
@param aCategory - The failure category to check against the configured
categories for triggering an artificial failure. It must have only one bit
set.
@returns Result<Ok, nsresult> - An Ok result if no failure occurs; an Err
result containing an error code if an artificial failure is triggered.
Note:
Consider replacing the preferences with a dedicated class with static
methods for entering and leaving artificial failure mode, something like
`ChaosMode`. The class would also implement an interface, for example
`nsIQuotaArtificialFailure` allowing access from scripts.
Example usage:
This example demonstrates the usage of `ArtificialFailure` in conjunction
with the `QM_TRY` macro to handle potential artificial failures gracefully.
The `QM_TRY` macro will return early if an artificial failure occurs, with
the corresponding error code from `ArtificialFailure`.
```cpp
QM_TRY(ArtificialFailure(
nsIQuotaArtificialFailure::CATEGORY_INITIALIZE_ORIGIN));
```
|
2492 |
Assertions.cpp |
|
1210 |
Assertions.h |
|
794 |
AssertionsImpl.h |
|
1413 |
BackgroundThreadObject.cpp |
|
1172 |
BackgroundThreadObject.h |
|
931 |
CachingDatabaseConnection.cpp |
|
5720 |
CachingDatabaseConnection.h |
|
7457 |
CanonicalQuotaObject.cpp |
aTruncate |
10013 |
CanonicalQuotaObject.h |
aIsRemote |
2418 |
CheckedUnsafePtr.h |
|
20349 |
CipherKeyManager.h |
|
3195 |
CipherStrategy.h |
|
1426 |
Client.cpp |
|
6683 |
Client.h |
|
5575 |
ClientDirectoryLock.cpp |
|
2353 |
ClientDirectoryLock.h |
|
2278 |
ClientImpl.h |
|
1088 |
ClientUsageArray.cpp |
|
1605 |
ClientUsageArray.h |
|
1004 |
CommonMetadata.h |
|
3293 |
CommonMetadataArray.h |
|
578 |
CommonMetadataArrayFwd.h |
|
664 |
components.conf |
|
869 |
Config.h |
|
1047 |
Constants.h |
|
1021 |
DebugOnlyMacro.h |
|
586 |
DecryptingInputStream.cpp |
|
3572 |
DecryptingInputStream.h |
|
6342 |
DecryptingInputStream_impl.h |
aCheckAvailableBytes |
15489 |
DirectoryLock.h |
|
908 |
DirectoryLockCategory.h |
|
625 |
DirectoryLockImpl.cpp |
Automatically log information about a directory lock if acquiring of the
directory lock takes this long. We've chosen a value that is long enough
that it is unlikely for the problem to be falsely triggered by slow system
I/O. We've also chosen a value long enough so that testers can notice the
timeout; we want to know about the timeouts, not hide them. On the other
hand this value is less than 45 seconds which is used by quota manager to
crash a hung quota manager shutdown.
|
13053 |
DirectoryLockImpl.h |
|
7497 |
DirectoryLockInlines.h |
|
1469 |
DummyCipherStrategy.h |
|
1746 |
EncryptedBlock.h |
|
3592 |
EncryptingOutputStream.cpp |
|
2033 |
EncryptingOutputStream.h |
|
3850 |
EncryptingOutputStream_impl.h |
|
8563 |
ErrorHandling.h |
|
1419 |
FileStreams.cpp |
aTruncate |
6864 |
FileStreams.h |
|
6204 |
FileUtils.cpp |
|
1408 |
FileUtils.h |
|
715 |
FirstInitializationAttempts.h |
|
2448 |
FirstInitializationAttemptsImpl.h |
|
1394 |
Flatten.h |
|
3287 |
ForwardDecls.h |
|
3700 |
GroupInfo.cpp |
|
2705 |
GroupInfo.h |
|
1992 |
GroupInfoPair.cpp |
|
928 |
GroupInfoPair.h |
|
2538 |
HashKeys.h |
|
808 |
InitializationTypes.cpp |
|
2506 |
InitializationTypes.h |
|
3431 |
InitializationUtils.h |
aExclusive |
3374 |
IPCQuotaObject.ipdlh |
|
441 |
IPCStreamCipherStrategy.h |
|
575 |
metrics.yaml |
|
3742 |
moz.build |
|
4464 |
MozPromiseUtils.h |
|
2331 |
NormalOriginOperationBase.cpp |
|
1091 |
NormalOriginOperationBase.h |
|
1802 |
NotifyUtils.cpp |
|
1597 |
NotifyUtils.h |
|
749 |
NotifyUtilsCommon.cpp |
|
1424 |
NotifyUtilsCommon.h |
|
738 |
nsIndexedDBProtocolHandler.cpp |
|
1359 |
nsIndexedDBProtocolHandler.h |
|
821 |
nsIQuotaArtificialFailure.idl |
|
649 |
nsIQuotaCallbacks.idl |
|
745 |
nsIQuotaManagerService.idl |
Asynchronously retrieves storage name and returns it as a plain string.
If the dom.quotaManager.testing preference is not true the call will be
a no-op.
|
18311 |
nsIQuotaRequests.idl |
|
1404 |
nsIQuotaResults.idl |
|
1957 |
NSSCipherStrategy.cpp |
|
4837 |
NSSCipherStrategy.h |
|
1824 |
OriginDirectoryLock.cpp |
aExclusive |
1560 |
OriginDirectoryLock.h |
|
1792 |
OriginInfo.cpp |
|
6279 |
OriginInfo.h |
In some special cases like the LocalStorage client where it's possible to
create a Quota-using representation but not actually write any data, we
want to be able to track quota for an origin without creating its origin
directory or the per-client files until they are actually needed to store
data. In those cases, the OriginInfo will be created by
InitQuotaForOrigin and the resulting mDirectoryExists will be false until
the origin actually needs to be created. It is possible for mUsage to be
greater than zero while mDirectoryExists is false, representing a state
where a client like LocalStorage has reserved quota for disk writes, but
has not yet flushed the data to disk.
|
4408 |
OriginOperationBase.cpp |
|
4953 |
OriginOperationBase.h |
|
2042 |
OriginOperationCallbacks.h |
|
2206 |
OriginOperations.cpp |
|
123101 |
OriginOperations.h |
|
7690 |
OriginParser.cpp |
|
11863 |
OriginParser.h |
|
3187 |
OriginScope.h |
|
11570 |
PersistenceScope.cpp |
|
962 |
PersistenceScope.h |
|
4465 |
PersistenceType.cpp |
|
7150 |
PersistenceType.h |
|
2323 |
PQuota.ipdl |
|
5877 |
PQuotaRequest.ipdl |
|
1170 |
PQuotaUsageRequest.ipdl |
|
459 |
PRemoteQuotaObject.ipdl |
|
730 |
PrincipalUtils.cpp |
|
10011 |
PrincipalUtils.h |
|
1865 |
PromiseUtils.cpp |
|
1124 |
PromiseUtils.h |
|
690 |
QMResult.cpp |
|
670 |
QMResult.h |
Propagate the result.
This is used by GenericErrorResult<QMResult> to create a propagated
result.
|
1622 |
QuotaCommon.cpp |
aStart |
21875 |
QuotaCommon.h |
|
70030 |
QuotaManager.h |
|
34693 |
QuotaManagerImpl.h |
|
1837 |
QuotaManagerService.cpp |
aIID |
51308 |
QuotaManagerService.h |
mozilla_dom_quota_QuotaManagerService_h |
2554 |
QuotaObject.cpp |
|
2507 |
QuotaObject.h |
|
2547 |
QuotaParent.cpp |
|
34304 |
QuotaParent.h |
|
6374 |
QuotaRequestBase.cpp |
|
1152 |
QuotaRequestBase.h |
|
1545 |
QuotaRequests.cpp |
|
6385 |
QuotaRequests.h |
|
2775 |
QuotaResults.cpp |
|
4459 |
QuotaResults.h |
|
1943 |
QuotaUsageRequestChild.cpp |
|
1390 |
QuotaUsageRequestChild.h |
|
1365 |
QuotaUsageRequestParent.cpp |
|
1153 |
QuotaUsageRequestParent.h |
|
1211 |
RemoteQuotaObject.cpp |
aIsRemote |
1623 |
RemoteQuotaObject.h |
|
1385 |
RemoteQuotaObjectChild.cpp |
|
1002 |
RemoteQuotaObjectChild.h |
|
1084 |
RemoteQuotaObjectParent.cpp |
aTruncate |
1995 |
RemoteQuotaObjectParent.h |
|
1363 |
RemoteQuotaObjectParentTracker.h |
|
1526 |
RemoveParen.h |
|
900 |
ResolvableNormalOriginOp.h |
|
1931 |
ResultExtensions.h |
|
5012 |
SanitizationUtils.cpp |
|
1146 |
SanitizationUtils.h |
|
682 |
ScopedLogExtraInfo.cpp |
static |
2665 |
ScopedLogExtraInfo.h |
|
2475 |
scripts |
|
|
SerializationHelpers.h |
|
6432 |
StorageHelpers.cpp |
|
2015 |
StorageHelpers.h |
This class provides a RAII wrap of attaching and detaching database
in a given C++ scope. It is guaranteed that an attached database will
be detached even if you have an exception or return early.
@param aConnection
The connection to attach a database to.
@param aDatabaseFile
The database file to attach.
@param aSchemaName
The schema-name. Can be any string literal which is supported by the
underlying database. For more details about schema-name, see
https://www.sqlite.org/lang_attach.html
|
1779 |
StorageManager.cpp |
PersistentStoragePermissionRequest
**************************************************************************** |
22029 |
StorageManager.h |
|
1769 |
StorageOriginAttributes.cpp |
|
2769 |
StorageOriginAttributes.h |
|
2010 |
StreamUtils.cpp |
|
2731 |
StreamUtils.h |
|
1209 |
StringifyUtils.cpp |
static |
1711 |
StringifyUtils.h |
|
1848 |
TargetPtrHolder.h |
|
1495 |
test |
|
|
ThreadUtils.cpp |
aThread |
2547 |
ThreadUtils.h |
Add a temporary thread observer and listen for the "AfterProcessNextEvent"
notification. Once the notification is received, remove the temporary thread
observer and call aCallback.
In practice, this calls aCallback immediately after the current thread is
done with running and releasing recently popped event from thread's event
queue.
If called multiple times, all the callbacks will be executed, in the
order in which RunAfterProcessingCurrentEvent() was called.
Use this method if you need to dispatch the same or some other runnable to
another thread in a way which prevents any race conditions (for example
unpredictable releases of objects).
This method should be used only in existing code which can't be easily
converted to use MozPromise which doesn't have the problem with
unpredictable releases of objects, see:
https://searchfox.org/mozilla-central/rev/4582d908c17fbf7924f5699609fe4a12c28ddc4a/xpcom/threads/MozPromise.h#866
Note: Calling this method from a thread pool is not supported since thread
pools don't fire the "AfterProcessNextEvent" notification. The method has
a diagnostic assertion for that so any calls like that will be caught
in builds with enabled diagnostic assertions. The callback will never
get executed in other builds, such as release builds. The limitation can
be removed completely when thread pool implementation gets support for firing
the "AfterProcessNextEvent".
|
2577 |
UniversalDirectoryLock.cpp |
aExclusive |
3000 |
UniversalDirectoryLock.h |
/ |
2157 |
UsageInfo.h |
|
2599 |