From a45a962517f77778c63e1f075f230efef0b5c437 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 19 Sep 2019 09:07:55 -0400 Subject: [PATCH] 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 --- platform/chromium/vapi-client.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/chromium/vapi-client.js b/platform/chromium/vapi-client.js index 3a5bc5d5c..2413b7c72 100644 --- a/platform/chromium/vapi-client.js +++ b/platform/chromium/vapi-client.js @@ -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 ) {