mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1226443 P4 Cleanup ServiceWorkerScriptCache objects when initialization fails. r=ehsan
This commit is contained in:
parent
050baae710
commit
46617253a4
@ -263,12 +263,14 @@ public:
|
||||
mCacheStorage = CreateCacheStorage(jsapi.cx(), aPrincipal, result, &mSandbox);
|
||||
if (NS_WARN_IF(result.Failed())) {
|
||||
MOZ_ASSERT(!result.IsErrorWithMessage());
|
||||
Cleanup();
|
||||
return result.StealNSResult();
|
||||
}
|
||||
|
||||
mCN = new CompareNetwork(this);
|
||||
nsresult rv = mCN->Initialize(aPrincipal, aURL, aLoadGroup);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
Cleanup();
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -277,6 +279,7 @@ public:
|
||||
rv = mCC->Initialize(aPrincipal, aURL, aCacheName);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
mCN->Abort();
|
||||
Cleanup();
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user