mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 17:49:39 +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:
parent
b82ce4d8d1
commit
a45a962517
@ -1,7 +1,7 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
uBlock Origin - a browser extension to block requests.
|
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
|
Copyright (C) 2015-present Raymond Hill
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
@ -117,7 +117,7 @@ vAPI.messaging = {
|
|||||||
// Unhandled messages
|
// Unhandled messages
|
||||||
this.extensions.every(ext => ext.canProcessMessage(details) !== true);
|
this.extensions.every(ext => ext.canProcessMessage(details) !== true);
|
||||||
},
|
},
|
||||||
messageListenerCallback: null,
|
messageListenerBound: null,
|
||||||
|
|
||||||
canDestroyPort: function() {
|
canDestroyPort: function() {
|
||||||
return this.pending.size === 0 &&
|
return this.pending.size === 0 &&
|
||||||
@ -151,7 +151,7 @@ vAPI.messaging = {
|
|||||||
const port = this.port;
|
const port = this.port;
|
||||||
if ( port !== null ) {
|
if ( port !== null ) {
|
||||||
port.disconnect();
|
port.disconnect();
|
||||||
port.onMessage.removeListener(this.messageListenerCallback);
|
port.onMessage.removeListener(this.messageListenerBound);
|
||||||
port.onDisconnect.removeListener(this.disconnectListenerBound);
|
port.onDisconnect.removeListener(this.disconnectListenerBound);
|
||||||
this.port = null;
|
this.port = null;
|
||||||
}
|
}
|
||||||
@ -168,8 +168,8 @@ vAPI.messaging = {
|
|||||||
|
|
||||||
createPort: function() {
|
createPort: function() {
|
||||||
if ( this.shuttingDown ) { return null; }
|
if ( this.shuttingDown ) { return null; }
|
||||||
if ( this.messageListenerCallback === null ) {
|
if ( this.messageListenerBound === null ) {
|
||||||
this.messageListenerCallback = this.messageListener.bind(this);
|
this.messageListenerBound = this.messageListener.bind(this);
|
||||||
this.disconnectListenerBound = this.disconnectListener.bind(this);
|
this.disconnectListenerBound = this.disconnectListener.bind(this);
|
||||||
this.portPollerBound = this.portPoller.bind(this);
|
this.portPollerBound = this.portPoller.bind(this);
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ vAPI.messaging = {
|
|||||||
vAPI.shutdown.exec();
|
vAPI.shutdown.exec();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
this.port.onMessage.addListener(this.messageListenerCallback);
|
this.port.onMessage.addListener(this.messageListenerBound);
|
||||||
this.port.onDisconnect.addListener(this.disconnectListenerBound);
|
this.port.onDisconnect.addListener(this.disconnectListenerBound);
|
||||||
this.portTimerDelay = 10000;
|
this.portTimerDelay = 10000;
|
||||||
if ( this.portTimer === null ) {
|
if ( this.portTimer === null ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user