Bug 917685 - Catch error thrown by nsILoadContext.associatedWindow; r=mfinkle

This commit is contained in:
Jim Chen 2013-10-16 10:51:23 -04:00
parent 6a3c733e80
commit a0e68faf9d

View File

@ -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;
},