1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

Fix property name inconsistency

Addtionally, fixed erroneous copyright date, as per
commit history:
https://github.com/gorhill/uBlock/commits/master/platform/chromium/vapi-client.js
This commit is contained in:
Raymond Hill 2019-09-19 09:07:55 -04:00
parent b82ce4d8d1
commit a45a962517
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1,7 +1,7 @@
/*******************************************************************************
uBlock Origin - a browser extension to block requests.
Copyright (C) 2014-present The uBlock Origin authors
Copyright (C) 2014-2015 The uBlock Origin authors
Copyright (C) 2015-present Raymond Hill
This program is free software: you can redistribute it and/or modify
@ -117,7 +117,7 @@ vAPI.messaging = {
// Unhandled messages
this.extensions.every(ext => ext.canProcessMessage(details) !== true);
},
messageListenerCallback: null,
messageListenerBound: null,
canDestroyPort: function() {
return this.pending.size === 0 &&
@ -151,7 +151,7 @@ vAPI.messaging = {
const port = this.port;
if ( port !== null ) {
port.disconnect();
port.onMessage.removeListener(this.messageListenerCallback);
port.onMessage.removeListener(this.messageListenerBound);
port.onDisconnect.removeListener(this.disconnectListenerBound);
this.port = null;
}
@ -168,8 +168,8 @@ vAPI.messaging = {
createPort: function() {
if ( this.shuttingDown ) { return null; }
if ( this.messageListenerCallback === null ) {
this.messageListenerCallback = this.messageListener.bind(this);
if ( this.messageListenerBound === null ) {
this.messageListenerBound = this.messageListener.bind(this);
this.disconnectListenerBound = this.disconnectListener.bind(this);
this.portPollerBound = this.portPoller.bind(this);
}
@ -184,7 +184,7 @@ vAPI.messaging = {
vAPI.shutdown.exec();
return null;
}
this.port.onMessage.addListener(this.messageListenerCallback);
this.port.onMessage.addListener(this.messageListenerBound);
this.port.onDisconnect.addListener(this.disconnectListenerBound);
this.portTimerDelay = 10000;
if ( this.portTimer === null ) {