Bug 689194 - Load ctypes.jsm in Fennec Contacts code only when it's needed [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 26 Sep 2011 10:45:42 -0700
changeset 77599 87e488a819a6216911de0fbbc739c1e33394611c
parent 77598 89fb82b4b6bcecbf2b457981162672b3db8eb720
child 77600 d90f49766941fdf6bbccc9d109afe7cd3969c257
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersmfinkle
bugs689194
milestone9.0a1
Bug 689194 - Load ctypes.jsm in Fennec Contacts code only when it's needed [r=mfinkle]
mobile/modules/contacts.jsm
--- a/mobile/modules/contacts.jsm
+++ b/mobile/modules/contacts.jsm
@@ -33,18 +33,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 let EXPORTED_SYMBOLS = ["Contacts"];
 
 const Cu = Components.utils;
 
-Cu.import("resource://gre/modules/ctypes.jsm");
-
 let Contacts = {
   _providers: [],
   _contacts: [],
 
   _load: function _load() {
     this._contacts = [];
 
     this._providers.forEach(function(provider) {
@@ -83,16 +81,17 @@ let Contacts = {
     }
     return results;
   }
 };
 
 #ifndef ANDROID
 #ifndef XP_MACOSX
 #ifdef XP_UNIX
+Cu.import("resource://gre/modules/ctypes.jsm");
 Cu.import("resource:///modules/linuxTypes.jsm");
 
 function EBookProvider() {
   EBook.init();
 }
 
 EBookProvider.prototype = {
   getContacts: function() {