From 38240f397a808be069a70f34fc3707ba38e50d2f Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Thu, 15 May 2014 17:01:39 +0100 Subject: [PATCH] Backed out changeset 13ca7eb38c28 (bug 993282) --- dom/contacts/fallback/ContactDB.jsm | 4 +--- dom/contacts/fallback/ContactService.jsm | 7 ++----- dom/phonenumberutils/PhoneNumber.jsm | 8 ++------ dom/phonenumberutils/PhoneNumberUtils.jsm | 9 +++------ 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/dom/contacts/fallback/ContactDB.jsm b/dom/contacts/fallback/ContactDB.jsm index 0caad00b4967..8cc9737a9ea7 100644 --- a/dom/contacts/fallback/ContactDB.jsm +++ b/dom/contacts/fallback/ContactDB.jsm @@ -15,11 +15,9 @@ const Cu = Components.utils; const Cc = Components.classes; const Ci = Components.interfaces; -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/IndexedDBHelper.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberUtils", - "resource://gre/modules/PhoneNumberUtils.jsm"); +Cu.import("resource://gre/modules/PhoneNumberUtils.jsm"); Cu.importGlobalProperties(["indexedDB"]); /* all exported symbols need to be bound to this on B2G - Bug 961777 */ diff --git a/dom/contacts/fallback/ContactService.jsm b/dom/contacts/fallback/ContactService.jsm index 8040e7d8ddeb..68f0dad9afe9 100644 --- a/dom/contacts/fallback/ContactService.jsm +++ b/dom/contacts/fallback/ContactService.jsm @@ -15,11 +15,8 @@ this.EXPORTED_SYMBOLS = ["ContactService"]; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "ContactDB", - "resource://gre/modules/ContactDB.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberUtils", - "resource://gre/modules/PhoneNumberUtils.jsm"); +Cu.import("resource://gre/modules/ContactDB.jsm"); +Cu.import("resource://gre/modules/PhoneNumberUtils.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "ppmm", "@mozilla.org/parentprocessmessagemanager;1", diff --git a/dom/phonenumberutils/PhoneNumber.jsm b/dom/phonenumberutils/PhoneNumber.jsm index 204f6112f4eb..76f6957e537d 100644 --- a/dom/phonenumberutils/PhoneNumber.jsm +++ b/dom/phonenumberutils/PhoneNumber.jsm @@ -8,13 +8,9 @@ this.EXPORTED_SYMBOLS = ["PhoneNumber"]; -const Cu = Components.utils; +Components.utils.import("resource://gre/modules/PhoneNumberMetaData.jsm"); +Components.utils.import("resource://gre/modules/PhoneNumberNormalizer.jsm"); -Cu.import('resource://gre/modules/XPCOMUtils.jsm'); -XPCOMUtils.defineLazyModuleGetter(this, "PHONE_NUMBER_META_DATA", - "resource://gre/modules/PhoneNumberMetaData.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberNormalizer", - "resource://gre/modules/PhoneNumberNormalizer.jsm"); this.PhoneNumber = (function (dataBase) { // Use strict in our context only - users might not want it 'use strict'; diff --git a/dom/phonenumberutils/PhoneNumberUtils.jsm b/dom/phonenumberutils/PhoneNumberUtils.jsm index 2b40eaa11c6e..7bccca3c0d16 100644 --- a/dom/phonenumberutils/PhoneNumberUtils.jsm +++ b/dom/phonenumberutils/PhoneNumberUtils.jsm @@ -14,10 +14,8 @@ const Ci = Components.interfaces; Cu.import("resource://gre/modules/Services.jsm"); Cu.import('resource://gre/modules/XPCOMUtils.jsm'); -XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberNormalizer", - "resource://gre/modules/PhoneNumberNormalizer.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "MCC_ISO3166_TABLE", - "resource://gre/modules/mcc_iso3166_table.jsm"); +Cu.import("resource://gre/modules/PhoneNumberNormalizer.jsm"); +Cu.import("resource://gre/modules/mcc_iso3166_table.jsm"); #ifdef MOZ_B2G_RIL XPCOMUtils.defineLazyServiceGetter(this, "mobileConnection", @@ -198,8 +196,7 @@ this.PhoneNumberUtils = { let inParent = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime) .processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT; if (inParent) { - XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumber", - "resource://gre/modules/PhoneNumber.jsm"); + Cu.import("resource://gre/modules/PhoneNumber.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "ppmm", "@mozilla.org/parentprocessmessagemanager;1", "nsIMessageListenerManager");