mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 917685 - Catch error thrown by nsILoadContext.associatedWindow; r=mfinkle
This commit is contained in:
parent
6a3c733e80
commit
a0e68faf9d
@ -2423,8 +2423,13 @@ var DesktopUserAgent = {
|
||||
|
||||
_getWindowForRequest: function ua_getWindowForRequest(aRequest) {
|
||||
let loadContext = this._getRequestLoadContext(aRequest);
|
||||
if (loadContext)
|
||||
if (loadContext) {
|
||||
try {
|
||||
return loadContext.associatedWindow;
|
||||
} catch (e) {
|
||||
// loadContext.associatedWindow can throw when there's no window
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user