зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1777931 - Add a few diagnostic asserts to the sub-resource cache. r=dholbert,layout-reviewers
The only thing that could trigger this is a bogus key, or overriding an already-loading stylesheet which we didn't correctly coalesce. Either of those is a bug. Differential Revision: https://phabricator.services.mozilla.com/D154915
This commit is contained in:
Родитель
4eb9d04769
Коммит
d3d0814758
|
@ -458,8 +458,9 @@ size_t SharedSubResourceCache<Traits, Derived>::SizeOfIncludingThis(
|
|||
template <typename Traits, typename Derived>
|
||||
void SharedSubResourceCache<Traits, Derived>::LoadStarted(
|
||||
const Key& aKey, LoadingValue& aValue) {
|
||||
MOZ_ASSERT(!aValue.mIsLoading, "Already loading? How?");
|
||||
MOZ_ASSERT(KeyFromLoadingValue(aValue).KeyEquals(aKey));
|
||||
MOZ_DIAGNOSTIC_ASSERT(!aValue.mIsLoading, "Already loading? How?");
|
||||
MOZ_DIAGNOSTIC_ASSERT(KeyFromLoadingValue(aValue).KeyEquals(aKey));
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mLoading.Contains(aKey), "Load not coalesced?");
|
||||
aValue.mIsLoading = true;
|
||||
mLoading.InsertOrUpdate(aKey, &aValue);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче