Bug 1927517 - Assertion failure: !(result & nsContentUtils::eParseHTMLInteger_ErrorOverflow), at /builds/worker/checkouts/gecko/docshell/base/nsDocShell.cpp:5231. r=farre

Differential Revision: https://phabricator.services.mozilla.com/D227520
This commit is contained in:
Peter Van der Beken 2024-11-20 09:58:50 +00:00
parent c618fda03b
commit 11b2d4633a
5 changed files with 11 additions and 3 deletions

View File

@ -0,0 +1 @@
<meta http-equiv="refresh" content="9223372036854775808">

View File

@ -0,0 +1 @@
<meta http-equiv="refresh" content="01234567">

View File

@ -0,0 +1 @@
<meta http-equiv="refresh" content="09223372036854775808">

View File

@ -23,3 +23,6 @@ pref(dom.disable_open_during_load,false) load 1690169-1.html
load 1672873.html
load 1753136.html
HTTP load 1804803.html
load 1927517-1.html
load 1927517-2.html
load 1927517-3.html

View File

@ -5186,8 +5186,7 @@ void nsDocShell::SetupRefreshURIFromHeader(Document* aDocument,
const char16_t* position = aHeader.BeginReading();
const char16_t* end = aHeader.EndReading();
// See
// https://html.spec.whatwg.org/#pragma-directives:shared-declarative-refresh-steps.
// See https://html.spec.whatwg.org/#shared-declarative-refresh-steps.
// 3. Skip ASCII whitespace
position = SkipASCIIWhitespace(position, end);
@ -5219,7 +5218,10 @@ void nsDocShell::SetupRefreshURIFromHeader(Document* aDocument,
// The spec assumes no errors here (since we only pass ASCII digits in),
// but we can still overflow, so this block should deal with that (and
// only that).
MOZ_ASSERT(!(result & nsContentUtils::eParseHTMLInteger_ErrorOverflow));
MOZ_ASSERT(
!(result & ~(nsContentUtils::eParseHTMLInteger_DidNotConsumeAllInput |
nsContentUtils::eParseHTMLInteger_Error |
nsContentUtils::eParseHTMLInteger_ErrorOverflow)));
return;
}
MOZ_ASSERT(