Bug 1043110 - Part 2 - dispatch mozbrowsererror. r=kanru

This commit is contained in:
Junior Hsu
2015-07-15 18:13:16 +08:00
parent 1e2f51f2fd
commit a7ce1db6ba
2 changed files with 9 additions and 1 deletions

View File

@@ -10423,6 +10423,10 @@ nsDocShell::DoURILoad(nsIURI* aURI,
// Here we prevent navigating to an app or widget which loses its validity
// by loading invalid page or other way.
if (browserFrame && !browserFrame->GetReallyIsApp()) {
nsCOMPtr<nsIObserverService> serv = services::GetObserverService();
if (serv) {
serv->NotifyObservers(GetDocument(), "invalid-widget", nullptr);
}
return NS_ERROR_MALFORMED_URI;
}
}