зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1329668 Handle partial initialized when ScriptLoader is canceled. r=baku
This commit is contained in:
Родитель
095ebc2535
Коммит
b54fac30f3
|
@ -1579,13 +1579,17 @@ CacheCreator::DeleteCache()
|
||||||
{
|
{
|
||||||
AssertIsOnMainThread();
|
AssertIsOnMainThread();
|
||||||
|
|
||||||
ErrorResult rv;
|
// This is called when the load is canceled which can occur before
|
||||||
|
// mCacheStorage is initialized.
|
||||||
|
if (!mCacheStorage) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// It's safe to do this while Cache::Match() and Cache::Put() calls are
|
// It's safe to do this while Cache::Match() and Cache::Put() calls are
|
||||||
// running.
|
// running.
|
||||||
|
IgnoredErrorResult rv;
|
||||||
RefPtr<Promise> promise = mCacheStorage->Delete(mCacheName, rv);
|
RefPtr<Promise> promise = mCacheStorage->Delete(mCacheName, rv);
|
||||||
if (NS_WARN_IF(rv.Failed())) {
|
if (NS_WARN_IF(rv.Failed())) {
|
||||||
rv.SuppressException();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче