mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1043110 - Part 2 - dispatch mozbrowsererror. r=kanru
This commit is contained in:
parent
6c768db7c2
commit
4376bd27f7
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,8 @@ let CERTIFICATE_ERROR_PAGE_PREF = 'security.alternate_certificate_error_page';
|
||||
const OBSERVED_EVENTS = [
|
||||
'xpcom-shutdown',
|
||||
'media-playback',
|
||||
'activity-done'
|
||||
'activity-done',
|
||||
'invalid-widget'
|
||||
];
|
||||
|
||||
const COMMAND_MAP = {
|
||||
@ -300,6 +301,9 @@ BrowserElementChild.prototype = {
|
||||
case 'xpcom-shutdown':
|
||||
this._shuttingDown = true;
|
||||
break;
|
||||
case 'invalid-widget':
|
||||
sendAsyncMsg('error', { type: 'invalid-widget' });
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user