From 6ca3211bf74897397be869eab20b4ca140e53cf2 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Thu, 27 Jun 2013 01:25:40 -0700 Subject: [PATCH 01/10] Bug 885979 - Add support for enabling Contacts API debugging output at runtime. r=gwagner --HG-- extra : rebase_source : b55c49743099532b939d57b673ae7f9a7cfc74da --- dom/contacts/ContactManager.js | 21 +++++++++++++- dom/contacts/fallback/ContactDB.jsm | 6 +++- dom/contacts/fallback/ContactService.jsm | 36 ++++++++++++++++++++++-- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/dom/contacts/ContactManager.js b/dom/contacts/ContactManager.js index d641f088108a..4224c2660ab2 100644 --- a/dom/contacts/ContactManager.js +++ b/dom/contacts/ContactManager.js @@ -4,7 +4,12 @@ "use strict"; -const DEBUG = false; +let DEBUG = false; + +function updateDebug(aResult) { + DEBUG = !!aResult; +} + function debug(s) { dump("-*- ContactManager: " + s + "\n"); } const Cc = Components.classes; @@ -27,6 +32,10 @@ XPCOMUtils.defineLazyServiceGetter(this, "cpmm", "@mozilla.org/childprocessmessagemanager;1", "nsIMessageSender"); +XPCOMUtils.defineLazyServiceGetter(this, "gSettingsService", + "@mozilla.org/settingsService;1", + "nsISettingsService"); + const CONTACTS_SENDMORE_MINIMUM = 5; function stringOrBust(aObj) { @@ -919,6 +928,16 @@ ContactManager.prototype = { "PermissionPromptHelper:AskPermission:OK", "Contacts:GetAll:Next", "Contacts:Revision", "Contacts:Count"]); + + let lock = gSettingsService.createLock(); + lock.get("dom.mozContacts.debugging.enabled", { + handle: function(aName, aResult) { + updateDebug(aResult); + }, + handleError: function(aErrorMessage) { + if (DEBUG) debug("Error reading dom.mozContacts.debugging.enabled setting: " + aErrorMessage); + } + }); }, // Called from DOMRequestIpcHelper diff --git a/dom/contacts/fallback/ContactDB.jsm b/dom/contacts/fallback/ContactDB.jsm index 7e9b51902e52..4f50733ad28c 100644 --- a/dom/contacts/fallback/ContactDB.jsm +++ b/dom/contacts/fallback/ContactDB.jsm @@ -6,7 +6,7 @@ this.EXPORTED_SYMBOLS = ['ContactDB']; -const DEBUG = false; +let DEBUG = false; function debug(s) { dump("-*- ContactDB component: " + s + "\n"); } const Cu = Components.utils; @@ -945,6 +945,10 @@ ContactDB.prototype = { this.substringMatching = aDigits; }, + enableDebugging: function(aEnable) { + DEBUG = aEnable; + }, + init: function init(aGlobal) { this.initDBHelper(DB_NAME, DB_VERSION, [STORE_NAME, SAVED_GETALL_STORE_NAME, REVISION_STORE], aGlobal); } diff --git a/dom/contacts/fallback/ContactService.jsm b/dom/contacts/fallback/ContactService.jsm index 9bd5bc4dfb51..659da8c6ef95 100644 --- a/dom/contacts/fallback/ContactService.jsm +++ b/dom/contacts/fallback/ContactService.jsm @@ -4,7 +4,7 @@ "use strict"; -const DEBUG = false; +let DEBUG = false; function debug(s) { dump("-*- Fallback ContactService component: " + s + "\n"); } const Cu = Components.utils; @@ -22,6 +22,10 @@ XPCOMUtils.defineLazyServiceGetter(this, "ppmm", "@mozilla.org/parentprocessmessagemanager;1", "nsIMessageListenerManager"); +XPCOMUtils.defineLazyServiceGetter(this, "gSettingsService", + "@mozilla.org/settingsService;1", + "nsISettingsService"); + let myGlobal = this; let ContactService = { @@ -52,17 +56,33 @@ let ContactService = { } } + let lock = gSettingsService.createLock(); + lock.get("dom.mozContacts.debugging.enabled", { + handle: function(aName, aResult) { + updateDebug(aResult); + }, + handleError: function(aErrorMessage) { + if (DEBUG) debug("Error reading dom.mozContacts.debugging.enabled setting: " + aErrorMessage); + } + }); + Services.obs.addObserver(this, "profile-before-change", false); + Services.obs.addObserver(this, "mozsettings-changed", false); Services.prefs.addObserver("dom.phonenumber.substringmatching", this, false); }, + enableDebugging: function(aResult) { + this._db.enableDebugging(aResult); + }, + observe: function(aSubject, aTopic, aData) { - if (aTopic === 'profile-before-change') { + if (aTopic === "profile-before-change") { myGlobal = null; this._messages.forEach(function(msgName) { ppmm.removeMessageListener(msgName, this); }.bind(this)); Services.obs.removeObserver(this, "profile-before-change"); + Services.obs.removeObserver(this, "mozsettings-changed"); Services.prefs.removeObserver("dom.phonenumber.substringmatching", this); ppmm = null; this._messages = null; @@ -71,7 +91,7 @@ let ContactService = { this._db = null; this._children = null; this._cursors = null; - } else if (aTopic === 'nsPref:changed' && aData.contains("dom.phonenumber.substringmatching")) { + } else if (aTopic === "nsPref:changed" && aData.contains("dom.phonenumber.substringmatching")) { // We don't fully support changing substringMatching during runtime. This is mostly for testing. let countryName = PhoneNumberUtils.getCountryName(); if (Services.prefs.getPrefType("dom.phonenumber.substringmatching." + countryName) == Ci.nsIPrefBranch.PREF_INT) { @@ -80,6 +100,11 @@ let ContactService = { this._db.enableSubstringMatching(val); } } + } else if (aTopic === "mozsettings-changed") { + let data = JSON.parse(aData); + if (data.key === "dom.mozContacts.debugging.enabled") { + updateDebug(data.value); + } } }, @@ -251,3 +276,8 @@ let ContactService = { } ContactService.init(); + +function updateDebug(aResult) { + DEBUG = !!aResult; + ContactService.enableDebugging(DEBUG); +} From 8d22a8b4a5de1645242929048c54308dfcf77950 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 04:00:23 -0700 Subject: [PATCH 02/10] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/1771b99267b6 Author: Francisco Borja Salguero Castellano Desc: Merge pull request #10584 from rwldrn/885274 Bug 885274 - [SMS/MMS] Option menu. Only execute menu operations when target has an associated action ======== https://hg.mozilla.org/integration/gaia-central/rev/f560e202627e Author: Rick Waldron Desc: Bug 885274 - [SMS/MMS] Option menu. Only execute menu operations when target has an associated action https://bugzilla.mozilla.org/show_bug.cgi?id=885274 Signed-off-by: Rick Waldron --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c022c9dcb01a..6d468f2092e7 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "e4d8c96f60dc17c64cf5374ab4e7f030de585bfa", + "revision": "1771b99267b6ae582f8b2453df92ccfcce126d5f", "repo_path": "/integration/gaia-central" } From 59460d11191db5c8e28fdbe22e6b2aedf67a6f42 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 04:35:44 -0700 Subject: [PATCH 03/10] Bumping gaia.json for 2 gaia-central revision(s) Truncated some number of revisions since the previous bump. ======== https://hg.mozilla.org/integration/gaia-central/rev/c4e3c4a68451 Author: steveck-chung Desc: Merge pull request #10655 from borjasalguero/weird_sound Bug 887158 - [SMS] DOMRequest change to an array of [DOMRequest]. r=steveck-chung ======== https://hg.mozilla.org/integration/gaia-central/rev/b0a1e159f16a Author: borjasalguero Desc: Bug 887158 - [SMS] DOMRequest change to an array of [DOMRequest]. r=schung --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 6d468f2092e7..8719adfae05a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "1771b99267b6ae582f8b2453df92ccfcce126d5f", + "revision": "c4e3c4a6845127324c818c506d15a6a852a40311", "repo_path": "/integration/gaia-central" } From 3657efe4edf1cf91a05cc25b084a7686d68034b9 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 04:45:31 -0700 Subject: [PATCH 04/10] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/23f3f5295abf Author: huchengtw-moz Desc: Merge pull request #9784 from huchengtw-moz/settings/Bug_842252_change_data_call_setting_architecture Bug 842252 - [B2G][Setting] Change data call setting architecture in Gai...r=@jaoo, r=@arthurcc, r=@fcampo ======== https://hg.mozilla.org/integration/gaia-central/rev/128513a67470 Author: John Hu Desc: Bug 842252 - [B2G][Setting] Change data call setting architecture in Gaia. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 8719adfae05a..88c6130a38ac 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "c4e3c4a6845127324c818c506d15a6a852a40311", + "revision": "23f3f5295abf9a8c28aae5f03534ce5419ecbba7", "repo_path": "/integration/gaia-central" } From d275618c71f2528ffcef62d4f7d8f6020f543aa3 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 06:45:22 -0700 Subject: [PATCH 05/10] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/a16bfd899489 Author: Ben Francis Desc: Merge pull request #10608 from Cwiiis/master Bug 817876 - Handle multiple modal dialogs from the same origin r=benfrancis ======== https://hg.mozilla.org/integration/gaia-central/rev/0e7d10d4d3dc Author: Chris Lord Desc: Bug 817876 - Handle multiple modal dialogs from the same origin --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 88c6130a38ac..cba26e08e7b0 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "23f3f5295abf9a8c28aae5f03534ce5419ecbba7", + "revision": "a16bfd899489e1e0878e225538ab2a4185447c6d", "repo_path": "/integration/gaia-central" } From c040992bdc9b712ff060be3622de37ba3fa58ecd Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 07:00:23 -0700 Subject: [PATCH 06/10] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/da576217a863 Author: Sam Joch Desc: Merge pull request #10580 from pivanov/bug-885925 Bug 885925 - Header in the calendar sidebar is different from the header in the building block r=@samjoch ======== https://hg.mozilla.org/integration/gaia-central/rev/52a95db5f38b Author: Pavel Ivanov Desc: Bug 885925 - Header in the calendar sidebar is different from the header in the building block --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index cba26e08e7b0..bdc0262c5534 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "a16bfd899489e1e0878e225538ab2a4185447c6d", + "revision": "da576217a86368ab3079334792a43e197d12e4b3", "repo_path": "/integration/gaia-central" } From d0f86fc4901fb35ce5947e37fbe585e8af452551 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 08:15:46 -0700 Subject: [PATCH 07/10] Bumping gaia.json for 1 gaia-central revision(s) Truncated some number of revisions since the previous bump. ======== https://hg.mozilla.org/integration/gaia-central/rev/461e2be993c7 Author: Julien Wajsberg Desc: Bug 887356 - Homescreen grid test failing on TBPL r=crdlc This uses sinon to make this sometimes failing test synchronous. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index bdc0262c5534..10914977a94e 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "da576217a86368ab3079334792a43e197d12e4b3", + "revision": "461e2be993c7afa7ea78be6b2d7652926a42caab", "repo_path": "/integration/gaia-central" } From 159c22b1c9c28942260d826b4ba638c416b54327 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 09:10:26 -0700 Subject: [PATCH 08/10] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/148e5145cad1 Author: Rick Waldron Desc: Bug 870416 - [MMS] Recipients container multiline view takes all available space - When the screen resizes, generate a CSS rule that calculates the max available height - Renames an existing element to match the naming convention - Adds non-html interpolation support to the template matcher regexp - Ensures that assimilations abide existing behavior rules https://bugzilla.mozilla.org/show_bug.cgi?id=870416 Signed-off-by: Rick Waldron ======== https://hg.mozilla.org/integration/gaia-central/rev/1af738671094 Author: Rick Waldron Desc: Bug 885264 - [SMS/MMS] Ensure Carrier is not displayed for manually entered (unknown contact) recipients 1. If a phone number has carrier associated with it the output will be: type | carrier 2. If there is no carrier associated with the phone number the output will be: type | phonenumber 3. If for some reason a single contact has two phone numbers with the same type and the same carrier the output will be: type | phonenumber 4. If for some reason a single contact has no name and no carrier, the output will be: type 5. If for some reason a single contact has no name, no type and no carrier, the output will be nothing. https://bugzilla.mozilla.org/show_bug.cgi?id=885264 Signed-off-by: Rick Waldron --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 10914977a94e..91dccac361ca 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "461e2be993c7afa7ea78be6b2d7652926a42caab", + "revision": "148e5145cad18783d90b08681a78c7078cdd6ffa", "repo_path": "/integration/gaia-central" } From 5033f2d32891d2ccebb32c41b04fba8d574413b8 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 10:40:44 -0700 Subject: [PATCH 09/10] Bumping gaia.json for 2 gaia-central revision(s) Truncated some number of revisions since the previous bump. ======== https://hg.mozilla.org/integration/gaia-central/rev/22af4c7c1801 Author: Sergi Mansilla Desc: Merge pull request #10674 from comoyo/vcard_utf8_2 Bug 885546 - VCF importer saves type="UTF-8" in contact fields [r=arcturus] ======== https://hg.mozilla.org/integration/gaia-central/rev/92aa02991dfe Author: Sergi Mansilla Desc: Bug 885546 - VCF importer saves type="UTF-8" in contact fields [r=arcturus] --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 91dccac361ca..5de777ffa6f2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "148e5145cad18783d90b08681a78c7078cdd6ffa", + "revision": "22af4c7c180116ba085a1747b1d310f017adb4e6", "repo_path": "/integration/gaia-central" } From 232b30805ce651a7621efa1ebae94732f5e0bf8d Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 27 Jun 2013 11:15:22 -0700 Subject: [PATCH 10/10] Bumping gaia.json for 1 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/dfacedfab904 Author: Anthony Ricaud Desc: Revert "Bug 883787 - Translate the code in HTML comments in the build process" This reverts commit 53eea8a3da5ae1de3de471a0b1d48aafdd7e81ce. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5de777ffa6f2..a597c7892c5f 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "22af4c7c180116ba085a1747b1d310f017adb4e6", + "revision": "dfacedfab9048c0b0e7235aa4d8a19714d5a8d54", "repo_path": "/integration/gaia-central" }