[Pkg-mozext-commits] [adblock-plus] 251/464: Actually clear the module scopes to alleviate the effects of memory leaks even further

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 23277261cda6853bbc192f251d3d10bde4075555
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Sat Jun 23 00:44:28 2012 +0200

    Actually clear the module scopes to alleviate the effects of memory leaks even further
---
 bootstrap.js.tmpl | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bootstrap.js.tmpl b/bootstrap.js.tmpl
index 8c044d4..71071fb 100644
--- a/bootstrap.js.tmpl
+++ b/bootstrap.js.tmpl
@@ -72,6 +72,13 @@ function shutdown(params, reason)
 
   // Make sure to release our ties to the modules even if the sandbox cannot be
   // released for some reason.
+  for (let key in require.scopes)
+  {
+    let scope = require.scopes[key];
+    let list = Object.keys(scope);
+    for (let i = 0; i < list.length; i++)
+      scope[list[i]] = null;
+  }
   require.scopes = null;
   addonData = null;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list