can throw when trying to access associatedWindow

This commit is contained in:
gorhill 2015-12-02 01:13:56 -05:00
parent 2705432f43
commit f2f653945e

View file

@ -1936,7 +1936,10 @@ var httpObserver = {
if ( lc.topFrameElement ) {
return tabWatcher.tabIdFromTarget(lc.topFrameElement);
}
var win = lc.associatedWindow;
var win;
try {
win = lc.associatedWindow;
} catch (ex) { }
if ( !win ) { return vAPI.noTabId; }
if ( win.top ) {
win = win.top;