From 2061a1352b00e641b7ccfcf7fdcaef422b003e95 Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Mon, 25 Nov 2013 15:19:27 +0800 Subject: [PATCH] Bug 921918 - 3.e/4: fix debug doesn't work when only turned on in pref. r=gene --- dom/mobilemessage/src/gonk/MmsService.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dom/mobilemessage/src/gonk/MmsService.js b/dom/mobilemessage/src/gonk/MmsService.js index 539169baee20..0213bef2ea61 100644 --- a/dom/mobilemessage/src/gonk/MmsService.js +++ b/dom/mobilemessage/src/gonk/MmsService.js @@ -18,6 +18,9 @@ const RIL_MMSSERVICE_CONTRACTID = "@mozilla.org/mms/rilmmsservice;1"; const RIL_MMSSERVICE_CID = Components.ID("{217ddd76-75db-4210-955d-8806cd8d87f9}"); let DEBUG = false; +function debug(s) { + dump("-@- MmsService: " + s + "\n"); +}; // Read debug setting from pref. try { @@ -2384,12 +2387,3 @@ MmsService.prototype = { }; this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MmsService]); - -let debug; -if (DEBUG) { - debug = function (s) { - dump("-@- MmsService: " + s + "\n"); - }; -} else { - debug = function (s) {}; -}