mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 767999: Actually use QuotaExceededErr. r=bent
--HG-- extra : rebase_source : 5c07a681371d46d1bc86af397b6d712fdd870e2b
This commit is contained in:
parent
3c9664b712
commit
08724d0fb4
@ -857,12 +857,18 @@ CommitHelper::Run()
|
||||
|
||||
if (!mAbortCode) {
|
||||
NS_NAMED_LITERAL_CSTRING(release, "COMMIT TRANSACTION");
|
||||
if (NS_SUCCEEDED(mConnection->ExecuteSimpleSQL(release))) {
|
||||
nsresult rv = mConnection->ExecuteSimpleSQL(release);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (mUpdateFileRefcountFunction) {
|
||||
mUpdateFileRefcountFunction->UpdateFileInfos();
|
||||
}
|
||||
CommitAutoIncrementCounts();
|
||||
}
|
||||
else if (rv == NS_ERROR_FILE_NO_DEVICE_SPACE) {
|
||||
// mozstorage translates SQLITE_FULL to NS_ERROR_FILE_NO_DEVICE_SPACE,
|
||||
// which we know better as NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR.
|
||||
mAbortCode = NS_ERROR_DOM_INDEXEDDB_QUOTA_ERR;
|
||||
}
|
||||
else {
|
||||
mAbortCode = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ function test1()
|
||||
is(result, "complete", "Got 'complete' result");
|
||||
}
|
||||
else {
|
||||
is(result, "abort UnknownError", "Got 'abort' result");
|
||||
is(result, "abort QuotaExceededError", "Got 'abort' result");
|
||||
}
|
||||
|
||||
if (addMoreTest1Count >= seenPopupCount + 5) {
|
||||
@ -108,7 +108,7 @@ function test2()
|
||||
if (addMoreCount > addMoreTest1Count + 5) {
|
||||
setFinishedCallback(function(result) {
|
||||
is(result, "finished", "Got 'finished' result");
|
||||
is(lastResult, "abort UnknownError", "Aborted as expected");
|
||||
is(lastResult, "abort QuotaExceededError", "Aborted as expected");
|
||||
ok(!seenPopup, "No popup");
|
||||
is(getPermission(testPageURL, "indexedDB-unlimited"),
|
||||
Components.interfaces.nsIPermissionManager.DENY_ACTION,
|
||||
|
Loading…
Reference in New Issue
Block a user