1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 04:49:12 +02:00

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;