diff --git a/platform/chromium/vapi-client.js b/platform/chromium/vapi-client.js index 5c015f57a..28eb05b62 100644 --- a/platform/chromium/vapi-client.js +++ b/platform/chromium/vapi-client.js @@ -84,8 +84,7 @@ vAPI.messaging = { shuttingDown: false, Connection: function(handler, details) { - const messaging = vAPI.messaging; - this.messaging = messaging; + this.messaging = vAPI.messaging; this.handler = handler; this.id = details.id; this.to = details.to; @@ -95,7 +94,7 @@ vAPI.messaging = { this.checkTimer = undefined; // On Firefox it appears ports are not automatically disconnected // when navigating to another page. - const ctor = vAPI.messaging.Connection; + const ctor = this.messaging.Connection; if ( ctor.pagehide !== undefined ) { return; } ctor.pagehide = ( ) => { for ( const connection of this.messaging.connections.values() ) { @@ -270,7 +269,7 @@ vAPI.messaging = { // the main process is no longer reachable: memory leaks and bad // performance become a risk -- especially for long-lived, dynamic // pages. Guard against this. - if ( this.pending.size > 25 ) { + if ( this.pending.size > 50 ) { vAPI.shutdown.exec(); } const port = this.getPort(); @@ -294,7 +293,7 @@ vAPI.messaging = { const port = this.getPort(); if ( port === null ) { return; } const connection = new this.Connection(handler, { - id: from + '-' + to + '-' + vAPI.sessionId, + id: `${from}-${to}-${vAPI.sessionId}`, to: to, from: from, fromToken: port.name diff --git a/platform/webext/manifest.json b/platform/webext/manifest.json index 019ea79ef..cb98db16b 100644 --- a/platform/webext/manifest.json +++ b/platform/webext/manifest.json @@ -2,7 +2,7 @@ "applications": { "gecko": { "id": "uBlock0@raymondhill.net", - "strict_min_version": "52.0" + "strict_min_version": "55.0" } }, "author": "All uBlock Origin contributors", diff --git a/src/js/scriptlets/should-inject-contentscript.js b/src/js/scriptlets/should-inject-contentscript.js index 8c9e9f3e3..2e8440f34 100644 --- a/src/js/scriptlets/should-inject-contentscript.js +++ b/src/js/scriptlets/should-inject-contentscript.js @@ -31,9 +31,7 @@ try { let status = vAPI.uBO !== true; if ( status === false && vAPI.bootstrap ) { - self.requestIdleCallback(( ) => { - return vAPI && vAPI.bootstrap(); - }); + self.requestIdleCallback(( ) => vAPI && vAPI.bootstrap()); } return status; } catch(ex) {