mirror of https://github.com/gorhill/uBlock.git
injected script can throw
This commit is contained in:
parent
11f349f54a
commit
334855dcf7
|
@ -284,8 +284,12 @@ const contentObserver = {
|
||||||
let lss = Services.scriptloader.loadSubScript;
|
let lss = Services.scriptloader.loadSubScript;
|
||||||
let sandbox = this.initContentScripts(win, true);
|
let sandbox = this.initContentScripts(win, true);
|
||||||
|
|
||||||
lss(this.contentBaseURI + 'vapi-client.js', sandbox);
|
try {
|
||||||
lss(this.contentBaseURI + 'contentscript-start.js', sandbox);
|
lss(this.contentBaseURI + 'vapi-client.js', sandbox);
|
||||||
|
lss(this.contentBaseURI + 'contentscript-start.js', sandbox);
|
||||||
|
} catch (ex) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let docReady = (e) => {
|
let docReady = (e) => {
|
||||||
let doc = e.target;
|
let doc = e.target;
|
||||||
|
@ -328,7 +332,7 @@ LocationChangeListener.prototype.onLocationChange = function(webProgress, reques
|
||||||
if ( !webProgress.isTopLevel ) {
|
if ( !webProgress.isTopLevel ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.messageManager.sendAsyncMessage(locationChangedMessageName, {
|
this.messageManager.sendAsyncMessage(locationChangedMessageName, {
|
||||||
url: location.asciiSpec,
|
url: location.asciiSpec,
|
||||||
flags: flags,
|
flags: flags,
|
||||||
|
|
|
@ -1329,7 +1329,7 @@ vAPI.net.registerListeners = function() {
|
||||||
var details = e.data;
|
var details = e.data;
|
||||||
var browser = e.target;
|
var browser = e.target;
|
||||||
var tabId = vAPI.tabs.getTabId(browser);
|
var tabId = vAPI.tabs.getTabId(browser);
|
||||||
|
|
||||||
//console.debug("nsIWebProgressListener: onLocationChange: " + details.url + " (" + details.flags + ")");
|
//console.debug("nsIWebProgressListener: onLocationChange: " + details.url + " (" + details.flags + ")");
|
||||||
|
|
||||||
// LOCATION_CHANGE_SAME_DOCUMENT = "did not load a new document"
|
// LOCATION_CHANGE_SAME_DOCUMENT = "did not load a new document"
|
||||||
|
|
Loading…
Reference in New Issue