Browse Source

Firefox: new method for request handling

Now both nsIContentPolicy and on-http-* observers are used for net request
monitoring.

Reasons:
 - In many cases, nsIContentPolicy.shouldLoad is invoked twice for the same
   resource, because of the speculative parsing.
 - nsIContentPolicy.shouldLoad don't have information about the channel,
   so it can't redirect the request, nor change its headers, however
   on-http-opening-request can.

Also, local mirroring and inline-script blocking has been implemented.
pull/2/head
Deathamns 10 years ago
committed by gorhill
parent
commit
3e39e1bd9f
  1. 6
      platform/firefox/vapi-client.js

6
platform/firefox/vapi-client.js

@ -108,12 +108,14 @@ vAPI.messaging = {
}, },
close: function() { close: function() {
if (this.connector) {
if ( !this.connector ) {
return;
}
removeMessageListener(this.connectorId, this.connector); removeMessageListener(this.connectorId, this.connector);
this.connector = null; this.connector = null;
this.channels = {}; this.channels = {};
this.listeners = {}; this.listeners = {};
}
}, },
channel: function(channelName, callback) { channel: function(channelName, callback) {

Loading…
Cancel
Save