Browse Source

fix #706

pull/2/head
gorhill 8 years ago
parent
commit
bf7acf678a
  1. 12
      platform/firefox/frameModule.js

12
platform/firefox/frameModule.js

@ -73,8 +73,11 @@ var contentObserver = {
contentBaseURI: 'chrome://' + hostName + '/content/js/',
cpMessageName: hostName + ':shouldLoad',
uniqueSandboxId: 1,
modernFirefox: Services.appinfo.ID === '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}' &&
Services.vc.compare(Services.appinfo.platformVersion, '44') > 0,
modernFirefox:
Services.vc.compare(Services.appinfo.platformVersion, '44') > 0 && (
Services.appinfo.ID === '{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}' ||
Services.appinfo.ID === '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}'
),
get componentRegistrar() {
return Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
@ -156,6 +159,11 @@ var contentObserver = {
contextWindow = (context.ownerDocument || context).defaultView;
}
// https://github.com/gorhill/uMatrix/issues/706
if ( !contextWindow ) {
return this.ACCEPT;
}
// The context for the toolbar popup is an iframe element here,
// so check context.top instead of context
if ( !contextWindow.top || !contextWindow.location ) {

Loading…
Cancel
Save