From eb22ee51b3b98c9e80e0c665aa9414db673b29a7 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 18 Nov 2014 11:35:42 -0200 Subject: [PATCH] avoid memory leaks in case no request handler found --- meta/crx/vapi-background.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/crx/vapi-background.js b/meta/crx/vapi-background.js index a6cfe65..ab27ce1 100644 --- a/meta/crx/vapi-background.js +++ b/meta/crx/vapi-background.js @@ -260,6 +260,11 @@ vAPI.messaging.onPortMessage = function(request, port) { } console.error('µBlock> messaging > unknown request: %o', request); + + // Unhandled: + // Need to callback anyways in case caller expected an answer, or + // else there is a memory leak on caller's side + callback(); }; /******************************************************************************/