[Pkg-mozext-commits] [adblock-plus] 211/464: Added onShutdown.done property to be considered by async actions

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:18 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 664d4a035b96d9b40964987077c153979e3d9e70
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Mon Jan 23 14:51:12 2012 +0100

    Added onShutdown.done property to be considered by async actions
---
 bootstrap.js.tmpl | 2 ++
 packager.py       | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/bootstrap.js.tmpl b/bootstrap.js.tmpl
index 72e5c58..bcb9d41 100644
--- a/bootstrap.js.tmpl
+++ b/bootstrap.js.tmpl
@@ -58,6 +58,7 @@ function shutdown(params, reason)
   {%- endif %}
 
   {%- if hasShutdownHandlers %}
+  onShutdown.done = true;
   for (let i = shutdownHandlers.length - 1; i >= 0; i --)
   {
     try
@@ -76,6 +77,7 @@ function shutdown(params, reason)
 let shutdownHandlers = [];
 let onShutdown =
 {
+  done: false,
   add: function(handler)
   {
     if (shutdownHandlers.indexOf(handler) < 0)
diff --git a/packager.py b/packager.py
index 5f31bd4..9611f5e 100644
--- a/packager.py
+++ b/packager.py
@@ -237,7 +237,7 @@ def addMissingFiles(baseDir, params, files):
     if not '/' in name:
       if re.search(r'(?:^|\s)unrequire\(', content):
         templateData['hasUnrequires'] = True
-      elif re.search(r'(?:^|\s)onShutdown\.(?:add|remove)\(', content):
+      elif re.search(r'(?:^|\s)onShutdown\.', content):
         templateData['hasShutdownHandlers'] = True
 
   for name, content in files.iteritems():

-- 
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