Bug 882186 - [System] Replace blue offline error page with new UX r=vingtetun,bz
This commit is contained in:
@@ -4591,8 +4591,26 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL,
|
||||
errorPageUrl.AppendLiteral("&d=");
|
||||
errorPageUrl.AppendASCII(escapedDescription.get());
|
||||
|
||||
// Append the manifest URL if the error comes from an app.
|
||||
uint32_t appId;
|
||||
nsresult rv = GetAppId(&appId);
|
||||
if (appId != nsIScriptSecurityManager::NO_APP_ID &&
|
||||
appId != nsIScriptSecurityManager::UNKNOWN_APP_ID) {
|
||||
nsCOMPtr<nsIAppsService> appsService =
|
||||
do_GetService(APPS_SERVICE_CONTRACTID);
|
||||
NS_ASSERTION(appsService, "No AppsService available");
|
||||
nsAutoString manifestURL;
|
||||
appsService->GetManifestURLByLocalId(appId, manifestURL);
|
||||
nsCString manifestParam;
|
||||
SAFE_ESCAPE(manifestParam,
|
||||
NS_ConvertUTF16toUTF8(manifestURL).get(),
|
||||
url_Path);
|
||||
errorPageUrl.AppendLiteral("&m=");
|
||||
errorPageUrl.AppendASCII(manifestParam.get());
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> errorPageURI;
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(errorPageURI), errorPageUrl);
|
||||
rv = NS_NewURI(getter_AddRefs(errorPageURI), errorPageUrl);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return InternalLoad(errorPageURI, nullptr, nullptr,
|
||||
|
||||
Reference in New Issue
Block a user