Bug 1637226 - Change the MOZ_DIAGNOSTIC_ASSERT in the ClientSource::WindowExecutionReady() to MOZ_ASSERT. r=dimi

In order to reduce the crash issue for users. Change this assertion to
MOZ_ASSERT.

Differential Revision: https://phabricator.services.mozilla.com/D74962
This commit is contained in:
Tim Huang 2020-05-12 20:59:08 +00:00
parent cf852bbfb9
commit 8d36a1fa47

View File

@ -262,10 +262,9 @@ nsresult ClientSource::WindowExecutionReady(nsPIDOMWindowInner* aInnerWindow) {
// continue to inherit the SW as well. We need to avoid triggering the
// assertion in this corner case.
if (mController.isSome()) {
MOZ_DIAGNOSTIC_ASSERT(spec.LowerCaseEqualsLiteral("about:blank") ||
StringBeginsWith(spec, NS_LITERAL_CSTRING("blob:")) ||
StorageAllowedForWindow(aInnerWindow) ==
StorageAccess::eAllow);
MOZ_ASSERT(spec.LowerCaseEqualsLiteral("about:blank") ||
StringBeginsWith(spec, NS_LITERAL_CSTRING("blob:")) ||
StorageAllowedForWindow(aInnerWindow) == StorageAccess::eAllow);
}
nsPIDOMWindowOuter* outer = aInnerWindow->GetOuterWindow();