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
1 changed files with 4 additions and 1 deletions

View File

@ -1936,7 +1936,10 @@ var httpObserver = {
if ( lc.topFrameElement ) { if ( lc.topFrameElement ) {
return tabWatcher.tabIdFromTarget(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 ) { return vAPI.noTabId; }
if ( win.top ) { if ( win.top ) {
win = win.top; win = win.top;