From 578735dd580cfd77e9c3fcc22ef5933ce8702e6c 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 a6cfe65fe..ab27ce1d9 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(); }; /******************************************************************************/