[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-launcher/master] Wrap Ctypes import in a try/catch.



commit 23f662965c7f6c9bc24cb3fd3c06848a2d41498c
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Tue Jul 16 13:27:08 2013 -0700

    Wrap Ctypes import in a try/catch.
    
    It throws an exception if ctypes is disabled during FF build.
---
 src/components/tl-process.js |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/tl-process.js b/src/components/tl-process.js
index 91a5ec2..c4906e1 100644
--- a/src/components/tl-process.js
+++ b/src/components/tl-process.js
@@ -8,7 +8,8 @@ const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/ctypes.jsm");
+// ctypes can be disabled at build time
+try { Cu.import("resource://gre/modules/ctypes.jsm"); } catch(e) {}
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "TorLauncherUtil",

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits