Browse Source

this fixes #490

pull/2/head
gorhill 10 years ago
parent
commit
e90bc19420
  1. 8
      platform/firefox/vapi-background.js

8
platform/firefox/vapi-background.js

@ -772,6 +772,8 @@ var httpObserver = {
ABORT: Components.results.NS_BINDING_ABORTED, ABORT: Components.results.NS_BINDING_ABORTED,
ACCEPT: Components.results.NS_SUCCEEDED, ACCEPT: Components.results.NS_SUCCEEDED,
MAIN_FRAME: Ci.nsIContentPolicy.TYPE_DOCUMENT, MAIN_FRAME: Ci.nsIContentPolicy.TYPE_DOCUMENT,
VALID_CSP_TARGETS: 1 << Ci.nsIContentPolicy.TYPE_DOCUMENT |
1 << Ci.nsIContentPolicy.TYPE_SUBDOCUMENT,
typeMap: { typeMap: {
2: 'script', 2: 'script',
3: 'image', 3: 'image',
@ -921,7 +923,11 @@ var httpObserver = {
return; return;
} }
if ( !channelData || channelData[0] !== this.MAIN_FRAME ) {
if ( !channelData ) {
return;
}
if ( 1 << channelData[0] & this.VALID_CSP_TARGETS === 0 ) {
return; return;
} }

Loading…
Cancel
Save