[Pkg-javascript-commits] [pdf.js] 23/56: Fixes webbrowser.js to avoid undefined callback call

David Prévot taffit at moszumanska.debian.org
Thu May 15 15:17:44 UTC 2014


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

taffit pushed a commit to branch master
in repository pdf.js.

commit 98ab547140a6cefd6c954389dc9cb02baa37fdaa
Author: Yury Delendik <ydelendik at mozilla.com>
Date:   Thu Apr 17 07:32:58 2014 -0500

    Fixes webbrowser.js to avoid undefined callback call
---
 test/webbrowser.js | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/test/webbrowser.js b/test/webbrowser.js
index 24d72a7..8c36432 100644
--- a/test/webbrowser.js
+++ b/test/webbrowser.js
@@ -74,18 +74,14 @@ WebBrowser.prototype = {
     try {
       testUtils.removeDirSync(this.tmpDir);
       this.process = null;
-      callback();
+      if (callback) {
+        callback();
+      }
     } catch (e) {
       console.error('Unable to cleanup after the process: ' + e);
       try {
         if (this.process) {
-          var pid = this.process.pid;
-          if (process.platform === 'win32') {
-            // kill does not really work on windows
-            spawn('taskkill', ['-F', '-PID', pid]).on('exit', callback);
-          } else {
-            spawn('kill', ['-s', 'SIGKILL', pid]).on('exit', callback);
-          }
+          this.process.kill('SIGKILL');
         }
       } catch (e) {}
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list