@@ -3559,6 +3559,16 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
35593559 errorPage.AssignLiteral("restartrequired");
35603560 error = "restartrequired";
35613561
3562+ // DisplayLoadError requires a non-empty messageStr to proceed and call
3563+ // LoadErrorPage. If the page doesn't have a title, we will use a blank
3564+ // space which will be trimmed and thus treated as empty by the front-end.
3565+ if (messageStr.IsEmpty()) {
3566+ messageStr.AssignLiteral(u" ");
3567+ }
3568+ } else if (NS_ERROR_RESTART_FORCED == aError) {
3569+ errorPage.AssignLiteral("restartforced");
3570+ error = "restartForced";
3571+
35623572 // DisplayLoadError requires a non-empty messageStr to proceed and call
35633573 // LoadErrorPage. If the page doesn't have a title, we will use a blank
35643574 // space which will be trimmed and thus treated as empty by the front-end.
@@ -6319,6 +6329,7 @@ nsresult nsDocShell::FilterStatusForErrorPage(
63196329 aStatus == NS_ERROR_PROXY_TOO_MANY_REQUESTS ||
63206330 aStatus == NS_ERROR_MALFORMED_URI ||
63216331 aStatus == NS_ERROR_BLOCKED_BY_POLICY ||
6332+ aStatus == NS_ERROR_RESTART_FORCED ||
63226333 aStatus == NS_ERROR_DOM_COOP_FAILED ||
63236334 aStatus == NS_ERROR_DOM_COEP_FAILED ||
63246335 aStatus == NS_ERROR_DOM_INVALID_HEADER_VALUE) &&
@@ -8536,6 +8547,9 @@ nsresult nsDocShell::PerformRetargeting(nsDocShellLoadState* aLoadState) {
85368547 if (shouldLoad == nsIContentPolicy::REJECT_POLICY) {
85378548 return NS_ERROR_BLOCKED_BY_POLICY;
85388549 }
8550+ if (shouldLoad == nsIContentPolicy::REJECT_RESTARTFORCED) {
8551+ return NS_ERROR_RESTART_FORCED;
8552+ }
85398553 }
85408554
85418555 return NS_ERROR_CONTENT_BLOCKED;
0 commit comments