From bd186fd1ce0a90f1faddc226fdf87c0b25261687 Mon Sep 17 00:00:00 2001 From: Dave Huseby Date: Sun, 30 Nov 2014 20:29:00 +0100 Subject: [PATCH 01/31] Bug 1093688 - [PP] ALA bug - Exception not working. r=mt --- dom/geolocation/nsGeolocationSettings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/geolocation/nsGeolocationSettings.cpp b/dom/geolocation/nsGeolocationSettings.cpp index 9ad4a39fc36..b94e81eff43 100644 --- a/dom/geolocation/nsGeolocationSettings.cpp +++ b/dom/geolocation/nsGeolocationSettings.cpp @@ -236,7 +236,7 @@ nsGeolocationSettings::HandleGeolocationPerOriginSettingsChange(const JS::Value& // enumerate the array AutoJSAPI jsapi; - jsapi.Init(); + jsapi.Init(&aVal.toObject()); JSContext* cx = jsapi.cx(); JS::Rooted obj(cx, &aVal.toObject()); JS::AutoIdArray ids(cx, JS_Enumerate(cx, obj)); @@ -312,7 +312,7 @@ nsGeolocationSettings::HandleGeolocationAlwaysPreciseChange(const JS::Value& aVa mAlwaysPreciseApps.Clear(); AutoJSAPI jsapi; - jsapi.Init(); + jsapi.Init(&aVal.toObject()); JSContext* cx = jsapi.cx(); JS::Rooted obj(cx, &aVal.toObject()); if (!JS_IsArrayObject(cx, obj)) { @@ -351,7 +351,7 @@ void GeolocationSetting::HandleTypeChange(const JS::Value& aVal) { AutoJSAPI jsapi; - jsapi.Init(); + jsapi.Init(&aVal.toObject()); JSContext* cx = jsapi.cx(); nsString str; if (!aVal.isString() || !AssignJSString(cx, str, aVal.toString())) { @@ -429,7 +429,7 @@ void GeolocationSetting::HandleFixedCoordsChange(const JS::Value& aVal) { AutoJSAPI jsapi; - jsapi.Init(); + jsapi.Init(&aVal.toObject()); JSContext* cx = jsapi.cx(); nsString str; if (!aVal.isString() || !AssignJSString(cx, str, aVal.toString()) || str.IsEmpty()) { From 1d44500221b6911bfed52e7358104401bb53d7f9 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Thu, 27 Nov 2014 03:07:00 +0100 Subject: [PATCH 02/31] Bug 1100345 - Make Mulet appear as B2G for Marionette r=jgriffin When running Gaia Marionette integration tests, we need to talk to Mulet like if it was a B2G device. We define the "b2g.is_mulet" pref for this purpose. --- b2g/app/b2g.js | 1 + testing/marionette/marionette-server.js | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index 67e4414f222..a63ae109208 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -15,6 +15,7 @@ pref("browser.chromeURL", "chrome://b2g/content/"); // so that it can't be set a just a string. // data: url is a workaround this. pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=chrome://b2g/content/shell.html"); +pref("b2g.is_mulet", true); // Prevent having the firstrun page pref("startup.homepage_welcome_url", ""); pref("browser.shell.checkDefaultBrowser", false); diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index 395d23f046c..29b675f1a96 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -37,8 +37,16 @@ specialpowers.specialPowersObserver.init(); Cu.import("resource://gre/modules/FileUtils.jsm"); Cu.import("resource://gre/modules/NetUtil.jsm"); +function isMulet() { + let isMulet = false; + try { + isMulet = Services.prefs.getBoolPref("b2g.is_mulet"); + } catch (ex) { } + return isMulet; +} + Services.prefs.setBoolPref("marionette.contentListener", false); -let appName = Services.appinfo.name; +let appName = isMulet() ? "B2G" : Services.appinfo.name; let { devtools } = Cu.import("resource://gre/modules/devtools/Loader.jsm", {}); let DevToolsUtils = devtools.require("devtools/toolkit/DevToolsUtils.js"); @@ -2943,10 +2951,9 @@ BrowserObj.prototype = { setBrowser: function BO_setBrowser(win) { switch (appName) { case "Firefox": - if (this.window.location.href.indexOf("chrome://b2g") == -1) { + if (!isMulet()) { this.browser = win.gBrowser; - } - else { + } else { // this is Mulet appName = "B2G"; } From 3073d0bd7212edaa850eca8e4e32d47bfb9f3be8 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 01:21:55 -0800 Subject: [PATCH 03/31] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/e0e95c183727 Author: viorelaioia Desc: Merge pull request #26601 from chirarobert/bug_1107005 Bug 1107005 - [v2.2] Disable test_call_log_all_calls.py due to Bug 10963... ======== https://hg.mozilla.org/integration/gaia-central/rev/dd84acd3369f Author: Robert Chira Desc: Bug 1107005 - [v2.2] Disable test_call_log_all_calls.py due to Bug 1096385 --- 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 98279373767..5e8dee54745 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d7e815eb184c843a9d7e5784e99d5e39a31c59da", + "revision": "e0e95c183727a5914b8420fa5e84bf5e17cb8eae", "repo_path": "integration/gaia-central" } From 9d7d2a0e3ebdcef1ab12081d61917de422f37c60 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 01:27:00 -0800 Subject: [PATCH 04/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index cbfacf1e020..640bc6aeb86 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index bac2f4a9615..b41ab2831a3 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 041ca6e3289..91ae7be15a6 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index f2ed8bd91e9..26881091b83 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index bac2f4a9615..b41ab2831a3 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index de206023a07..0336ebfa5d2 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index f3a4e502395..17ae2fa1d71 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index e4114be5e34..6d1f1b70394 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index cd9f4b39ea1..8e70565f719 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index ce5a63593d6..9523a9497ab 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index a91d49d7962..1fbad80d1ae 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 87b29a96c517538489f27a1bb0bdba0d51d5b5ae Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Wed, 3 Dec 2014 11:29:42 +0100 Subject: [PATCH 05/31] Backed out changeset 168da3cbb27b (bug 1093688) for failing gip tests --- dom/geolocation/nsGeolocationSettings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/geolocation/nsGeolocationSettings.cpp b/dom/geolocation/nsGeolocationSettings.cpp index b94e81eff43..9ad4a39fc36 100644 --- a/dom/geolocation/nsGeolocationSettings.cpp +++ b/dom/geolocation/nsGeolocationSettings.cpp @@ -236,7 +236,7 @@ nsGeolocationSettings::HandleGeolocationPerOriginSettingsChange(const JS::Value& // enumerate the array AutoJSAPI jsapi; - jsapi.Init(&aVal.toObject()); + jsapi.Init(); JSContext* cx = jsapi.cx(); JS::Rooted obj(cx, &aVal.toObject()); JS::AutoIdArray ids(cx, JS_Enumerate(cx, obj)); @@ -312,7 +312,7 @@ nsGeolocationSettings::HandleGeolocationAlwaysPreciseChange(const JS::Value& aVa mAlwaysPreciseApps.Clear(); AutoJSAPI jsapi; - jsapi.Init(&aVal.toObject()); + jsapi.Init(); JSContext* cx = jsapi.cx(); JS::Rooted obj(cx, &aVal.toObject()); if (!JS_IsArrayObject(cx, obj)) { @@ -351,7 +351,7 @@ void GeolocationSetting::HandleTypeChange(const JS::Value& aVal) { AutoJSAPI jsapi; - jsapi.Init(&aVal.toObject()); + jsapi.Init(); JSContext* cx = jsapi.cx(); nsString str; if (!aVal.isString() || !AssignJSString(cx, str, aVal.toString())) { @@ -429,7 +429,7 @@ void GeolocationSetting::HandleFixedCoordsChange(const JS::Value& aVal) { AutoJSAPI jsapi; - jsapi.Init(&aVal.toObject()); + jsapi.Init(); JSContext* cx = jsapi.cx(); nsString str; if (!aVal.isString() || !AssignJSString(cx, str, aVal.toString()) || str.IsEmpty()) { From b8f4b31669e6a8b2e126817bb244ae0c03a97e0f Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Thu, 6 Nov 2014 11:12:38 +0800 Subject: [PATCH 06/31] Bug 1048676 - Part 1: WebIDL and DOM change. r=smaug, dimi From 28e46b34f04d20d5f10c14a85e77ec1ac98aad9e Mon Sep 17 00:00:00 2001 --- dom/apps/PermissionsTable.jsm | 9 +++++++-- dom/nfc/nsNfc.js | 9 +++++---- dom/webidl/MozNFC.webidl | 8 ++------ dom/webidl/MozNFCPeer.webidl | 2 +- dom/webidl/MozNFCPeerEvent.webidl | 2 +- dom/webidl/MozNFCTagEvent.webidl | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) --- dom/apps/PermissionsTable.jsm | 9 +++++++-- dom/nfc/nsNfc.js | 9 +++++---- dom/webidl/MozNFC.webidl | 8 ++------ dom/webidl/MozNFCPeer.webidl | 2 +- dom/webidl/MozNFCPeerEvent.webidl | 2 +- dom/webidl/MozNFCTagEvent.webidl | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/dom/apps/PermissionsTable.jsm b/dom/apps/PermissionsTable.jsm index 9887e90b148..e02d771afd7 100644 --- a/dom/apps/PermissionsTable.jsm +++ b/dom/apps/PermissionsTable.jsm @@ -411,8 +411,13 @@ this.PermissionsTable = { geolocation: { app: DENY_ACTION, trusted: DENY_ACTION, privileged: DENY_ACTION, - certified: ALLOW_ACTION, - access: ["read", "write"] + certified: ALLOW_ACTION + }, + "nfc-share": { + app: DENY_ACTION, + trusted: DENY_ACTION, + privileged: DENY_ACTION, + certified: ALLOW_ACTION }, "nfc-manager": { app: DENY_ACTION, diff --git a/dom/nfc/nsNfc.js b/dom/nfc/nsNfc.js index 2887d8f8950..fc3dda88d86 100644 --- a/dom/nfc/nsNfc.js +++ b/dom/nfc/nsNfc.js @@ -389,7 +389,7 @@ MozNFCImpl.prototype = { return; } - if (!this.checkPermissions(["nfc-read", "nfc-write"])) { + if (!this.checkPermissions(["nfc"])) { return; } @@ -426,7 +426,7 @@ MozNFCImpl.prototype = { return; } - if (!this.checkPermissions(["nfc-read", "nfc-write"])) { + if (!this.checkPermissions(["nfc"])) { return; } @@ -461,7 +461,8 @@ MozNFCImpl.prototype = { return; } - if (!this.checkPermissions(["nfc-write"])) { + let perm = isPeerReady ? ["nfc-share"] : ["nfc"]; + if (!this.checkPermissions(perm)) { return; } @@ -483,7 +484,7 @@ MozNFCImpl.prototype = { return; } - if (!this.checkPermissions(["nfc-write"])) { + if (!this.checkPermissions(["nfc", "nfc-share"])) { return; } diff --git a/dom/webidl/MozNFC.webidl b/dom/webidl/MozNFC.webidl index 5fa99daddc9..62ddf94d1b1 100644 --- a/dom/webidl/MozNFC.webidl +++ b/dom/webidl/MozNFC.webidl @@ -78,7 +78,7 @@ interface MozNFCManager { [JSImplementation="@mozilla.org/navigatorNfc;1", NavigatorProperty="mozNfc", Func="Navigator::HasNFCSupport", - CheckPermissions="nfc-read nfc-write", + CheckPermissions="nfc nfc-share", AvailableIn="CertifiedApps"] interface MozNFC : EventTarget { /** @@ -86,32 +86,28 @@ interface MozNFC : EventTarget { * to share data to the NFCPeer object by calling mozNFC.notifyUserAcceptedP2P. * The event will be type of NFCPeerEvent. */ - [CheckPermissions="nfc-write"] + [CheckPermissions="nfc-share"] attribute EventHandler onpeerready; /** * This event will be fired when a NFCPeer is detected. */ - [CheckPermissions="nfc-write"] attribute EventHandler onpeerfound; /** * This event will be fired when NFCPeer, earlier detected in onpeerready * or onpeerfound, moves out of range. */ - [CheckPermissions="nfc-write"] attribute EventHandler onpeerlost; /** * Ths event will be fired when a NFCTag is detected. */ - [CheckPermissions="nfc-read nfc-write"] attribute EventHandler ontagfound; /** * This event will be fired if the tag detected in ontagfound has been removed. */ - [CheckPermissions="nfc-read nfc-write"] attribute EventHandler ontaglost; }; diff --git a/dom/webidl/MozNFCPeer.webidl b/dom/webidl/MozNFCPeer.webidl index d9c32776651..93770292af8 100644 --- a/dom/webidl/MozNFCPeer.webidl +++ b/dom/webidl/MozNFCPeer.webidl @@ -19,7 +19,7 @@ interface MozNFCPeer { /** * Send file to peer device. */ - [Throws] + [Throws, CheckPermissions="nfc-share"] Promise sendFile(Blob blob); }; diff --git a/dom/webidl/MozNFCPeerEvent.webidl b/dom/webidl/MozNFCPeerEvent.webidl index edbae6fd158..102b21bb167 100644 --- a/dom/webidl/MozNFCPeerEvent.webidl +++ b/dom/webidl/MozNFCPeerEvent.webidl @@ -5,7 +5,7 @@ */ [Constructor(DOMString type, optional MozNFCPeerEventInit eventInitDict), - Func="Navigator::HasNFCSupport", CheckPermissions="nfc-write", + Func="Navigator::HasNFCSupport", CheckPermissions="nfc nfc-share", AvailableIn="CertifiedApps"] interface MozNFCPeerEvent : Event { diff --git a/dom/webidl/MozNFCTagEvent.webidl b/dom/webidl/MozNFCTagEvent.webidl index 1a3c5942805..e4b5cef75ed 100644 --- a/dom/webidl/MozNFCTagEvent.webidl +++ b/dom/webidl/MozNFCTagEvent.webidl @@ -5,7 +5,7 @@ */ [Constructor(DOMString type, optional MozNFCTagEventInit eventInitDict), - Func="Navigator::HasNFCSupport", CheckPermissions="nfc-read nfc-write", + Func="Navigator::HasNFCSupport", CheckPermissions="nfc", AvailableIn="CertifiedApps"] interface MozNFCTagEvent : Event { From c1509da309df4e316128fd70f3a462b57e136596 Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Thu, 6 Nov 2014 11:21:07 +0800 Subject: [PATCH 07/31] Bug 1048676 - Part 2: Nfc.js and test case change. r=dimi From 609631024dbcf07d74c13b15ce201b499e6176dd Mon Sep 17 00:00:00 2001 --- dom/nfc/gonk/Nfc.js | 30 +++++++++++----------- .../marionette/test_nfc_checkP2PRegistration.js | 4 +-- .../tests/marionette/test_nfc_error_messages.js | 4 +-- dom/nfc/tests/marionette/test_nfc_peer.js | 4 ++- 4 files changed, 22 insertions(+), 20 deletions(-) --- dom/nfc/gonk/Nfc.js | 30 +++++++++---------- .../test_nfc_checkP2PRegistration.js | 4 +-- .../marionette/test_nfc_error_messages.js | 4 +-- dom/nfc/tests/marionette/test_nfc_peer.js | 4 ++- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/dom/nfc/gonk/Nfc.js b/dom/nfc/gonk/Nfc.js index 080f852cd89..79d092ec025 100644 --- a/dom/nfc/gonk/Nfc.js +++ b/dom/nfc/gonk/Nfc.js @@ -63,16 +63,16 @@ const NFC_IPC_MSG_NAMES = [ "NFC:QueryInfo" ]; -const NFC_IPC_READ_PERM_MSG_NAMES = [ +const NFC_IPC_NFC_PERM_MSG_NAMES = [ "NFC:ReadNDEF", "NFC:Connect", "NFC:Close", -]; - -const NFC_IPC_WRITE_PERM_MSG_NAMES = [ "NFC:WriteNDEF", "NFC:MakeReadOnly", "NFC:Format", +]; + +const NFC_IPC_NFC_SHARE_PERM_MSG_NAMES = [ "NFC:SendFile", "NFC:RegisterPeerReadyTarget", "NFC:UnregisterPeerReadyTarget" @@ -139,11 +139,11 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { ppmm.addMessageListener(message, this); } - for (let message of NFC_IPC_READ_PERM_MSG_NAMES) { + for (let message of NFC_IPC_NFC_PERM_MSG_NAMES) { ppmm.addMessageListener(message, this); } - for (let message of NFC_IPC_WRITE_PERM_MSG_NAMES) { + for (let message of NFC_IPC_NFC_SHARE_PERM_MSG_NAMES) { ppmm.addMessageListener(message, this); } @@ -163,11 +163,11 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { ppmm.removeMessageListener(message, this); } - for (let message of NFC_IPC_READ_PERM_MSG_NAMES) { + for (let message of NFC_IPC_NFC_PERM_MSG_NAMES) { ppmm.removeMessageListener(message, this); } - for (let message of NFC_IPC_WRITE_PERM_MSG_NAMES) { + for (let message of NFC_IPC_NFC_SHARE_PERM_MSG_NAMES) { ppmm.removeMessageListener(message, this); } @@ -293,16 +293,16 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { if (NFC_IPC_MSG_NAMES.indexOf(message.name) != -1 || NFC_IPC_ADD_EVENT_TARGET_MSG_NAMES.indexOf(message.name) != -1 ) { // Do nothing. - } else if (NFC_IPC_READ_PERM_MSG_NAMES.indexOf(message.name) != -1) { - if (!message.target.assertPermission("nfc-read")) { - debug("Nfc message " + message.name + - " from a content process with no 'nfc-read' privileges."); + } else if (NFC_IPC_NFC_PERM_MSG_NAMES.indexOf(message.name) != -1) { + if (!message.target.assertPermission("nfc")) { + debug("Nfc Peer message " + message.name + + " from a content process with no 'nfc' privileges."); return null; } - } else if (NFC_IPC_WRITE_PERM_MSG_NAMES.indexOf(message.name) != -1) { - if (!message.target.assertPermission("nfc-write")) { + } else if (NFC_IPC_NFC_SHARE_PERM_MSG_NAMES.indexOf(message.name) != -1) { + if (!message.target.assertPermission("nfc-share")) { debug("Nfc Peer message " + message.name + - " from a content process with no 'nfc-write' privileges."); + " from a content process with no 'nfc-share' privileges."); return null; } } else if (NFC_IPC_MANAGER_PERM_MSG_NAMES.indexOf(message.name) != -1) { diff --git a/dom/nfc/tests/marionette/test_nfc_checkP2PRegistration.js b/dom/nfc/tests/marionette/test_nfc_checkP2PRegistration.js index e4e80c73fb0..81a3b623a73 100644 --- a/dom/nfc/tests/marionette/test_nfc_checkP2PRegistration.js +++ b/dom/nfc/tests/marionette/test_nfc_checkP2PRegistration.js @@ -146,11 +146,11 @@ let tests = [ /** * nfc-manager for mozNfc.checkP2PRegistration(manifestUrl) * -> "NFC:CheckP2PRegistration" IPC - * nfc-write to set/unset onpeerready + * nfc-share to set/unset onpeerready * -> "NFC:RegisterPeerTarget", "NFC:UnregisterPeerTarget" IPC */ SpecialPowers.pushPermissions( [ {'type': 'nfc-manager', 'allow': true, context: document}, - {'type': 'nfc-write', 'allow': true, context: document} + {'type': 'nfc-share', 'allow': true, context: document} ], runTests); diff --git a/dom/nfc/tests/marionette/test_nfc_error_messages.js b/dom/nfc/tests/marionette/test_nfc_error_messages.js index 4a91f2c758e..60388fc3858 100644 --- a/dom/nfc/tests/marionette/test_nfc_error_messages.js +++ b/dom/nfc/tests/marionette/test_nfc_error_messages.js @@ -146,11 +146,11 @@ let tests = [ /** * nfc-manager for mozNfc.checkP2PRegistration(manifestUrl) * -> "NFC:CheckP2PRegistration" IPC - * nfc-write to set/unset onpeerready + * nfc-share to set/unset onpeerready * -> "NFC:RegisterPeerTarget", "NFC:UnregisterPeerTarget" IPC */ SpecialPowers.pushPermissions( [ {'type': 'nfc-manager', 'allow': true, context: document}, - {'type': 'nfc-write', 'allow': true, context: document} + {'type': 'nfc-share', 'allow': true, context: document} ], runTests); diff --git a/dom/nfc/tests/marionette/test_nfc_peer.js b/dom/nfc/tests/marionette/test_nfc_peer.js index fb184e7e23a..1a000dbe462 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer.js +++ b/dom/nfc/tests/marionette/test_nfc_peer.js @@ -201,4 +201,6 @@ let tests = [ SpecialPowers.pushPermissions( [{"type": "nfc-manager", "allow": true, context: document}, - {"type": "nfc-write", "allow": true, context: document}], runTests); + {"type": "nfc", "allow": true, context: document}, + {"type": "nfc-share", "allow": true, context: document}], runTests); + From 3a5eafb89508852c6e5289e133c71c27a41d0230 Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Wed, 26 Nov 2014 15:02:36 +0800 Subject: [PATCH 08/31] Bug 1103732 - remove getNFCPeer. r=smaug, dimi --- dom/nfc/NfcContentHelper.js | 15 ------------- dom/nfc/gonk/Nfc.js | 38 ++++----------------------------- dom/nfc/gonk/nfc_consts.js | 9 ++------ dom/nfc/nsINfcContentHelper.idl | 4 +--- dom/nfc/nsNfc.js | 20 ++--------------- dom/webidl/MozNFC.webidl | 6 ------ 6 files changed, 9 insertions(+), 83 deletions(-) diff --git a/dom/nfc/NfcContentHelper.js b/dom/nfc/NfcContentHelper.js index 362a7ae8311..6838ae581aa 100644 --- a/dom/nfc/NfcContentHelper.js +++ b/dom/nfc/NfcContentHelper.js @@ -131,21 +131,6 @@ NfcContentHelper.prototype = { return encodedRecords; }, - // NFC interface: - checkSessionToken: function checkSessionToken(sessionToken, isP2P) { - if (sessionToken == null) { - throw Components.Exception("No session token!", - Cr.NS_ERROR_UNEXPECTED); - return false; - } - // Report session to Nfc.js only. - let val = cpmm.sendSyncMessage("NFC:CheckSessionToken", { - sessionToken: sessionToken, - isP2P: isP2P - }); - return (val[0] === NFC.NFC_GECKO_SUCCESS); - }, - // NFCTag interface readNDEF: function readNDEF(sessionToken, callback) { let requestId = callback.getCallbackId(); diff --git a/dom/nfc/gonk/Nfc.js b/dom/nfc/gonk/Nfc.js index 79d092ec025..4139c009e07 100644 --- a/dom/nfc/gonk/Nfc.js +++ b/dom/nfc/gonk/Nfc.js @@ -54,12 +54,8 @@ const NFC_CONTRACTID = "@mozilla.org/nfc;1"; const NFC_CID = Components.ID("{2ff24790-5e74-11e1-b86c-0800200c9a66}"); -const NFC_IPC_ADD_EVENT_TARGET_MSG_NAMES = [ - "NFC:AddEventListener" -]; - const NFC_IPC_MSG_NAMES = [ - "NFC:CheckSessionToken", + "NFC:AddEventListener", "NFC:QueryInfo" ]; @@ -131,10 +127,6 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { _registerMessageListeners: function _registerMessageListeners() { ppmm.addMessageListener("child-process-shutdown", this); - for (let message of NFC_IPC_ADD_EVENT_TARGET_MSG_NAMES) { - ppmm.addMessageListener(message, this); - } - for (let message of NFC_IPC_MSG_NAMES) { ppmm.addMessageListener(message, this); } @@ -155,10 +147,6 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { _unregisterMessageListeners: function _unregisterMessageListeners() { ppmm.removeMessageListener("child-process-shutdown", this); - for (let message of NFC_IPC_ADD_EVENT_TARGET_MSG_NAMES) { - ppmm.removeMessageListener(message, this); - } - for (let message of NFC_IPC_MSG_NAMES) { ppmm.removeMessageListener(message, this); } @@ -290,8 +278,7 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { return null; } - if (NFC_IPC_MSG_NAMES.indexOf(message.name) != -1 || - NFC_IPC_ADD_EVENT_TARGET_MSG_NAMES.indexOf(message.name) != -1 ) { + if (NFC_IPC_MSG_NAMES.indexOf(message.name) != -1) { // Do nothing. } else if (NFC_IPC_NFC_PERM_MSG_NAMES.indexOf(message.name) != -1) { if (!message.target.assertPermission("nfc")) { @@ -320,11 +307,6 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { case "NFC:AddEventListener": this.addEventListener(message.target); return null; - case "NFC:CheckSessionToken": - let sessionToken = message.data.sessionToken; - return SessionHelper.isValidToken(sessionToken, message.data.isP2P) ? - NFC.NFC_GECKO_SUCCESS : - NFC.NFC_GECKO_ERROR_BAD_SESSION_TOKEN; case "NFC:RegisterPeerReadyTarget": this.registerPeerReadyTarget(message.target, message.data.appId); return null; @@ -341,7 +323,7 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { // Upon receiving the status of sendFile operation, send the response // to appropriate content process. message.data.type = "NotifySendFileStatusResponse"; - if (message.data.status !== NFC.NFC_SUCCESS) { + if (message.data.status) { message.data.errorMsg = this.nfc.getErrorMessage(NFC.NFC_GECKO_ERROR_SEND_FILE_FAILED); } @@ -421,17 +403,6 @@ let SessionHelper = { isP2PSession: function isP2PSession(id) { return (this.tokenMap[id] != null) && this.tokenMap[id].isP2P; - }, - - isValidToken: function isValidToken(token, isP2P) { - for (let id in this.tokenMap) { - if ((this.tokenMap[id].token == token) && - (this.tokenMap[id].isP2P == isP2P)) { - return true; - } - } - - return false; } }; @@ -511,8 +482,7 @@ Nfc.prototype = { }, getErrorMessage: function getErrorMessage(errorCode) { - return NFC.NFC_ERROR_MSG[errorCode] || - NFC.NFC_ERROR_MSG[NFC.NFC_GECKO_ERROR_GENERIC_FAILURE]; + return NFC.NFC_ERROR_MSG[errorCode]; }, /** diff --git a/dom/nfc/gonk/nfc_consts.js b/dom/nfc/gonk/nfc_consts.js index 72f88c050df..ad28542cd43 100644 --- a/dom/nfc/gonk/nfc_consts.js +++ b/dom/nfc/gonk/nfc_consts.js @@ -23,17 +23,12 @@ this.DEBUG_CONTENT_HELPER = DEBUG_ALL || false; this.DEBUG_NFC = DEBUG_ALL || false; // Gecko specific error codes -this.NFC_GECKO_SUCCESS = 0; -this.NFC_GECKO_ERROR_GENERIC_FAILURE = 1; -this.NFC_GECKO_ERROR_P2P_REG_INVALID = 2; -this.NFC_GECKO_ERROR_SEND_FILE_FAILED = 3; -this.NFC_GECKO_ERROR_BAD_SESSION_TOKEN = 4; +this.NFC_GECKO_ERROR_P2P_REG_INVALID = 1; +this.NFC_GECKO_ERROR_SEND_FILE_FAILED = 2; this.NFC_ERROR_MSG = {}; -this.NFC_ERROR_MSG[this.NFC_GECKO_ERROR_GENERIC_FAILURE] = "NfcGenericFailureError"; this.NFC_ERROR_MSG[this.NFC_GECKO_ERROR_P2P_REG_INVALID] = "NfcP2PRegistrationInvalid"; this.NFC_ERROR_MSG[this.NFC_GECKO_ERROR_SEND_FILE_FAILED] = "NfcSendFileFailed"; -this.NFC_ERROR_MSG[this.NFC_GECKO_ERROR_BAD_SESSION_TOKEN] = "NfcBadSessionToken"; this.NFC_RF_STATE_IDLE = "idle"; this.NFC_RF_STATE_LISTEN = "listen"; diff --git a/dom/nfc/nsINfcContentHelper.idl b/dom/nfc/nsINfcContentHelper.idl index a63edb8795c..16cfed1878c 100644 --- a/dom/nfc/nsINfcContentHelper.idl +++ b/dom/nfc/nsINfcContentHelper.idl @@ -87,13 +87,11 @@ interface nsINfcRequestCallback : nsISupports void notifyError(in DOMString errorMsg); }; -[scriptable, uuid(bcf214de-885b-43e6-9e53-9b7d880e1633)] +[scriptable, uuid(c5fdf956-735e-45d3-aa25-3a871bd3e2f8)] interface nsINfcContentHelper : nsISupports { void init(in nsIDOMWindow window); - boolean checkSessionToken(in DOMString sessionToken, in boolean isP2P); - /** * Read current NDEF data on the tag. * diff --git a/dom/nfc/nsNfc.js b/dom/nfc/nsNfc.js index fc3dda88d86..deee381dde2 100644 --- a/dom/nfc/nsNfc.js +++ b/dom/nfc/nsNfc.js @@ -332,23 +332,6 @@ MozNFCImpl.prototype = { return callback.promise; }, - _createNFCPeer: function _createNFCPeer(sessionToken) { - let peer = new MozNFCPeerImpl(this._window, sessionToken); - return this._window.MozNFCPeer._create(this._window, peer); - }, - - getNFCPeer: function getNFCPeer(sessionToken) { - if (!sessionToken || !this._nfcContentHelper.checkSessionToken(sessionToken, true)) { - return null; - } - - if (!this.nfcPeer || this.nfcPeer.session != sessionToken) { - this.nfcPeer = this._createNFCPeer(sessionToken); - } - - return this.nfcPeer; - }, - defineEventHandlerGetterSetter: function defineEventHandlerGetterSetter(name) { Object.defineProperty(this, name, { get: function get() { @@ -469,7 +452,8 @@ MozNFCImpl.prototype = { this.eventService.addSystemEventListener(this._window, "visibilitychange", this, /* useCapture */false); - this.nfcPeer = this._createNFCPeer(sessionToken); + let peerImpl = new MozNFCPeerImpl(this._window, sessionToken); + this.nfcPeer = this._window.MozNFCPeer._create(this._window, peerImpl) let eventData = { "peer": this.nfcPeer }; let type = (isPeerReady) ? "peerready" : "peerfound"; diff --git a/dom/webidl/MozNFC.webidl b/dom/webidl/MozNFC.webidl index 62ddf94d1b1..6ccf7730509 100644 --- a/dom/webidl/MozNFC.webidl +++ b/dom/webidl/MozNFC.webidl @@ -28,12 +28,6 @@ enum NfcErrorMessage { [NoInterfaceObject] interface MozNFCManager { - /** - * Returns MozNFCPeer object or null in case of invalid sessionToken - */ - [CheckPermissions="nfc-manager"] - MozNFCPeer? getNFCPeer(DOMString sessionToken); - /** * API to check if the given application's manifest * URL is registered with the Chrome Process or not. From 1a9fe93e27af415774d20ca4cc12687d1cb465f7 Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Thu, 27 Nov 2014 15:05:29 +0800 Subject: [PATCH 09/31] Bug 1103732 - Part 2: update test cases. r=dimi From abdfb00788f359f4ed9bbd502a7e723350e3212d Mon Sep 17 00:00:00 2001 --- dom/nfc/tests/marionette/test_nfc_peer.js | 16 ++-------------- dom/nfc/tests/marionette/test_nfc_peer_sendFile.js | 3 +-- dom/nfc/tests/marionette/test_nfc_peer_sendndef.js | 5 ++--- 3 files changed, 5 insertions(+), 19 deletions(-) --- dom/nfc/tests/marionette/test_nfc_peer.js | 16 ++-------------- .../tests/marionette/test_nfc_peer_sendFile.js | 3 +-- .../tests/marionette/test_nfc_peer_sendndef.js | 5 ++--- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/dom/nfc/tests/marionette/test_nfc_peer.js b/dom/nfc/tests/marionette/test_nfc_peer.js index 1a000dbe462..2ab480b8101 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer.js +++ b/dom/nfc/tests/marionette/test_nfc_peer.js @@ -66,10 +66,7 @@ function testPeerReady() { function testGetNFCPeer() { sysMsgHelper.waitForTechDiscovered(function (msg) { - let peer = nfc.getNFCPeer(msg.sessionToken); - ok(peer instanceof MozNFCPeer, "Should get a NFCPeer object."); - let peer1 = nfc.getNFCPeer(msg.sessionToken); - ok(peer == peer1, "Should get the same MozNFCPeer object"); + ok(msg.peer instanceof MozNFCPeer, "Should get a NFCPeer object."); NCI.deactivate().then(() => toggleNFC(false)).then(runNextTest); }); @@ -181,22 +178,13 @@ function testPeerShouldThrow() { .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)); } -function testPeerInvalidToken() { - log("testPeerInvalidToken"); - let peer = nfc.getNFCPeer("fakeSessionToken"); - is(peer, null, "NFCPeer should be null on wrong session token"); - - runNextTest(); -} - let tests = [ testPeerReady, testGetNFCPeer, testCheckP2PRegFailure, testPeerLostShouldBeCalled, testPeerLostShouldNotBeCalled, - testPeerShouldThrow, - testPeerInvalidToken + testPeerShouldThrow ]; SpecialPowers.pushPermissions( diff --git a/dom/nfc/tests/marionette/test_nfc_peer_sendFile.js b/dom/nfc/tests/marionette/test_nfc_peer_sendFile.js index ee93cf99209..0b1841ec5b2 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer_sendFile.js +++ b/dom/nfc/tests/marionette/test_nfc_peer_sendFile.js @@ -8,8 +8,7 @@ let MANIFEST_URL = "app://system.gaiamobile.org/manifest.webapp"; function sendFile(msg) { log("sendFile msg="+JSON.stringify(msg)); - let peer = nfc.getNFCPeer(msg.sessionToken); - ok(peer instanceof MozNFCPeer, "should get a MozNFCPeer"); + ok(msg.peer instanceof MozNFCPeer, "should get a MozNFCPeer"); ok(msg.blob instanceof Blob, "should get a Blob"); nfc.peerready = null; diff --git a/dom/nfc/tests/marionette/test_nfc_peer_sendndef.js b/dom/nfc/tests/marionette/test_nfc_peer_sendndef.js index d4da90e4624..f587d1ee105 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer_sendndef.js +++ b/dom/nfc/tests/marionette/test_nfc_peer_sendndef.js @@ -6,13 +6,12 @@ MARIONETTE_HEAD_JS = "head.js"; let url = "https://www.example.com"; -function sendNDEF(techType, sessionToken) { +function sendNDEF(techType, peer) { let tnf = NDEF.TNF_WELL_KNOWN; let type = new Uint8Array(NfcUtils.fromUTF8("U")); let payload = new Uint8Array(NfcUtils.fromUTF8(url)); let ndef = [new MozNDEFRecord({tnf: tnf, type: type, payload: payload})]; - let peer = window.navigator.mozNfc.getNFCPeer(sessionToken); let promise = peer.sendNDEF(ndef); promise.then(() => { log("Successfully sent NDEF message"); @@ -35,7 +34,7 @@ function handleTechnologyDiscoveredRE0(msg) { is(msg.type, "techDiscovered", "check for correct message type"); let index = msg.techList.indexOf("P2P"); isnot(index, -1, "check for \'P2P\' in tech list"); - sendNDEF(msg.techList[index], msg.sessionToken); + sendNDEF(msg.techList[index], msg.peer); } function testOnPeerReadyRE0() { From b1bbbaf15baa30afe6975d90c7f086446aee70f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Mon, 24 Nov 2014 11:05:35 -0800 Subject: [PATCH 10/31] Bug 1003848 - Don't use sync messaging during BrowserElementChild initialization r=smaug --- dom/base/nsFrameLoader.cpp | 25 ++++++++++++++ dom/browser-element/BrowserElementChild.js | 13 ++----- dom/browser-element/BrowserElementParent.js | 8 ----- ...rowserElement_SetVisibleFrames2_Outer.html | 4 --- dom/ipc/PBrowser.ipdl | 8 +++++ dom/ipc/TabChild.cpp | 34 +++++++++++++++++-- dom/ipc/TabChild.h | 3 ++ dom/ipc/TabParent.cpp | 14 +++++++- 8 files changed, 83 insertions(+), 26 deletions(-) diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index e5f142f8279..14873d855b7 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -52,6 +52,7 @@ #include "nsIPermissionManager.h" #include "nsISHistory.h" #include "nsNullPrincipal.h" +#include "nsIScriptError.h" #include "nsLayoutUtils.h" #include "nsView.h" @@ -1762,6 +1763,30 @@ nsFrameLoader::MaybeCreateDocShell() NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js"), /* allowDelayedLoad = */ true, /* aRunInGlobalScope */ true); + // For inproc frames, set the docshell properties. + nsCOMPtr item = do_GetInterface(docShell); + nsAutoString name; + if (mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name)) { + item->SetName(name); + } + mDocShell->SetFullscreenAllowed( + mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) || + mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)); + bool isPrivate = mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing); + if (isPrivate) { + bool nonBlank; + mDocShell->GetHasLoadedNonBlankURI(&nonBlank); + if (nonBlank) { + nsContentUtils::ReportToConsoleNonLocalized( + NS_LITERAL_STRING("We should not switch to Private Browsing after loading a document."), + nsIScriptError::warningFlag, + NS_LITERAL_CSTRING("mozprivatebrowsing"), + nullptr); + } else { + nsCOMPtr context = do_GetInterface(mDocShell); + context->SetUsePrivateBrowsing(true); + } + } } return NS_OK; diff --git a/dom/browser-element/BrowserElementChild.js b/dom/browser-element/BrowserElementChild.js index 4996b178e0f..81747115e43 100644 --- a/dom/browser-element/BrowserElementChild.js +++ b/dom/browser-element/BrowserElementChild.js @@ -52,14 +52,5 @@ if (!('BrowserElementIsPreloaded' in this)) { var BrowserElementIsReady = true; -let infos = sendSyncMessage('browser-element-api:call', - { 'msg_name': 'hello' })[0]; -docShell.QueryInterface(Ci.nsIDocShellTreeItem).name = infos.name; -docShell.setFullscreenAllowed(infos.fullscreenAllowed); -if (infos.isPrivate) { - if (docShell.hasLoadedNonBlankURI) { - Cu.reportError("We should not switch to Private Browsing after loading a document."); - } else { - docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = true; - } -} + +sendAsyncMessage('browser-element-api:call', { 'msg_name': 'hello' }); diff --git a/dom/browser-element/BrowserElementParent.js b/dom/browser-element/BrowserElementParent.js index 038434fa1f5..42f9a94c267 100644 --- a/dom/browser-element/BrowserElementParent.js +++ b/dom/browser-element/BrowserElementParent.js @@ -325,14 +325,6 @@ BrowserElementParent.prototype = { this._domRequestReady = true; this._runPendingAPICall(); } - - return { - name: this._frameElement.getAttribute('name'), - fullscreenAllowed: - this._frameElement.hasAttribute('allowfullscreen') || - this._frameElement.hasAttribute('mozallowfullscreen'), - isPrivate: this._frameElement.hasAttribute('mozprivatebrowsing') - }; }, _fireCtxMenuEvent: function(data) { diff --git a/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html b/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html index 3694f621705..c4fa25d26bb 100644 --- a/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html +++ b/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html @@ -15,10 +15,6 @@ iframe.addEventListener('mozbrowsershowmodalprompt', function(e) { }, 0); }, 0); } - else { - // Pass the message up to our parent. - alert(e.detail.message); - } }); document.body.appendChild(iframe); diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 93f34ffa8df..aec8a18047c 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -69,6 +69,13 @@ union MaybeNativeKeyBinding void_t; }; +struct ShowInfo +{ + nsString name; + bool fullscreenAllowed; + bool isPrivate; +}; + prio(normal upto urgent) intr protocol PBrowser { manager PContent or PContentBridge; @@ -411,6 +418,7 @@ child: * point. */ Show(nsIntSize size, + ShowInfo info, ScrollingBehavior scrolling, TextureFactoryIdentifier textureFactoryIdentifier, uint64_t layersId, diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 7d850ba69dc..15da283b5ab 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1881,10 +1881,36 @@ TabChild::DoFakeShow(const ScrollingBehavior& aScrolling, const uint64_t& aLayersId, PRenderFrameChild* aRenderFrame) { - RecvShow(nsIntSize(0, 0), aScrolling, aTextureFactoryIdentifier, aLayersId, aRenderFrame); + ShowInfo info(EmptyString(), false, false); + RecvShow(nsIntSize(0, 0), info, aScrolling, aTextureFactoryIdentifier, aLayersId, aRenderFrame); mDidFakeShow = true; } +void +TabChild::ApplyShowInfo(const ShowInfo& aInfo) +{ + nsCOMPtr docShell = do_GetInterface(WebNavigation()); + if (docShell) { + nsCOMPtr item = do_GetInterface(docShell); + item->SetName(aInfo.name()); + docShell->SetFullscreenAllowed(aInfo.fullscreenAllowed()); + if (aInfo.isPrivate()) { + bool nonBlank; + docShell->GetHasLoadedNonBlankURI(&nonBlank); + if (nonBlank) { + nsContentUtils::ReportToConsoleNonLocalized( + NS_LITERAL_STRING("We should not switch to Private Browsing after loading a document."), + nsIScriptError::warningFlag, + NS_LITERAL_CSTRING("mozprivatebrowsing"), + nullptr); + } else { + nsCOMPtr context = do_GetInterface(docShell); + context->SetUsePrivateBrowsing(true); + } + } + } +} + #ifdef MOZ_WIDGET_GONK void TabChild::MaybeRequestPreinitCamera() @@ -1945,6 +1971,7 @@ TabChild::MaybeRequestPreinitCamera() bool TabChild::RecvShow(const nsIntSize& aSize, + const ShowInfo& aInfo, const ScrollingBehavior& aScrolling, const TextureFactoryIdentifier& aTextureFactoryIdentifier, const uint64_t& aLayersId, @@ -1953,6 +1980,7 @@ TabChild::RecvShow(const nsIntSize& aSize, MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame)); if (mDidFakeShow) { + ApplyShowInfo(aInfo); return true; } @@ -1976,7 +2004,9 @@ TabChild::RecvShow(const nsIntSize& aSize, MaybeRequestPreinitCamera(); #endif - return InitTabChildGlobal(); + bool res = InitTabChildGlobal(); + ApplyShowInfo(aInfo); + return res; } bool diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index ff0243a5e5e..8b84a78fdd2 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -317,6 +317,7 @@ public: const FileDescriptor& aFileDescriptor) MOZ_OVERRIDE; virtual bool RecvShow(const nsIntSize& aSize, + const ShowInfo& aInfo, const ScrollingBehavior& aScrolling, const TextureFactoryIdentifier& aTextureFactoryIdentifier, const uint64_t& aLayersId, @@ -552,6 +553,8 @@ private: const uint64_t& aLayersId, PRenderFrameChild* aRenderFrame); + void ApplyShowInfo(const ShowInfo& aInfo); + // These methods are used for tracking synthetic mouse events // dispatched for compatibility. On each touch event, we // UpdateTapState(). If we've detected that the current gesture diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 7f9f1b4e68e..0b065ce9585 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -600,7 +600,19 @@ TabParent::Show(const nsIntSize& size) unused << SendPRenderFrameConstructor(renderFrame); } } - unused << SendShow(size, scrolling, textureFactoryIdentifier, layersId, renderFrame); + + ShowInfo info(EmptyString(), false, false); + if (mFrameElement) { + nsAutoString name; + mFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name); + bool allowFullscreen = + mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) || + mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen); + bool isPrivate = mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing); + info = ShowInfo(name, allowFullscreen, isPrivate); + } + + unused << SendShow(size, info, scrolling, textureFactoryIdentifier, layersId, renderFrame); } void From d84dc3c609da1fb183a8eb63c4128ab9561aeb56 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Wed, 3 Dec 2014 07:26:29 -0800 Subject: [PATCH 11/31] Bug 1094177: Call |Keystore::Shutdown| to cleanup key store, r=chucklee --- dom/system/gonk/SystemWorkerManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/system/gonk/SystemWorkerManager.cpp b/dom/system/gonk/SystemWorkerManager.cpp index 7332817662d..edf8fb6dad2 100644 --- a/dom/system/gonk/SystemWorkerManager.cpp +++ b/dom/system/gonk/SystemWorkerManager.cpp @@ -130,7 +130,7 @@ SystemWorkerManager::Shutdown() mWifiWorker = nullptr; if (mKeyStore) { - mKeyStore->CloseSocket(); + mKeyStore->Shutdown(); mKeyStore = nullptr; } From 1c12d1d38d4c3b09940f1d1fc2f2a6d7279482f9 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Wed, 3 Dec 2014 07:26:29 -0800 Subject: [PATCH 12/31] Bug 1094177: Fix VIM modelines in implementation of key store, r=chucklee This patch modifies the VIM modelines in |KeyStore.{cpp,h}| to match Mozilla's coding style. --- ipc/keystore/KeyStore.cpp | 2 +- ipc/keystore/KeyStore.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ipc/keystore/KeyStore.cpp b/ipc/keystore/KeyStore.cpp index 712fac4126a..486f8cd8847 100644 --- a/ipc/keystore/KeyStore.cpp +++ b/ipc/keystore/KeyStore.cpp @@ -1,5 +1,5 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set sw=4 ts=8 et ft=cpp: */ +/* vim: set sw=2 ts=2 et ft=cpp: tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ diff --git a/ipc/keystore/KeyStore.h b/ipc/keystore/KeyStore.h index 028e0ff9a6c..887c9d8b17a 100644 --- a/ipc/keystore/KeyStore.h +++ b/ipc/keystore/KeyStore.h @@ -1,5 +1,5 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set sw=2 ts=8 et ft=cpp: */ +/* vim: set sw=2 ts=2 et ft=cpp: tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ From 579a827e2055b515b062fef85115f3c6949d3dc6 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Wed, 3 Dec 2014 07:26:29 -0800 Subject: [PATCH 13/31] Bug 1094177: Convert |KeyStore| to use |{Listen|Stream}Socket|, r=chucklee With the use of separate listen and stream sockets in |KeyStore|, the listen socket remains open while |KeyStore| serves a connected client on the stream socket. When the client disconnected, |KeyStore| continues to listen for the next connection request. The old dependency on |UnixSocketConsumer| has been removed. --- ipc/keystore/KeyStore.cpp | 158 +++++++++++++++++++++++++++++++++++--- ipc/keystore/KeyStore.h | 68 ++++++++++++++-- 2 files changed, 206 insertions(+), 20 deletions(-) diff --git a/ipc/keystore/KeyStore.cpp b/ipc/keystore/KeyStore.cpp index 486f8cd8847..d9c263d761c 100644 --- a/ipc/keystore/KeyStore.cpp +++ b/ipc/keystore/KeyStore.cpp @@ -369,7 +369,92 @@ KeyStoreConnector::GetSocketAddr(const sockaddr_any& aAddr, MOZ_CRASH("This should never be called!"); } +// +// KeyStore::ListenSocket +// + +KeyStore::ListenSocket::ListenSocket(KeyStore* aKeyStore) +: mKeyStore(aKeyStore) +{ + MOZ_ASSERT(mKeyStore); + + MOZ_COUNT_CTOR(KeyStore::ListenSocket); +} + +void +KeyStore::ListenSocket::OnConnectSuccess() +{ + mKeyStore->OnConnectSuccess(LISTEN_SOCKET); + + MOZ_COUNT_DTOR(KeyStore::ListenSocket); +} + +void +KeyStore::ListenSocket::OnConnectError() +{ + mKeyStore->OnConnectError(LISTEN_SOCKET); +} + +void +KeyStore::ListenSocket::OnDisconnect() +{ + mKeyStore->OnDisconnect(LISTEN_SOCKET); +} + +// +// KeyStore::StreamSocket +// + +KeyStore::StreamSocket::StreamSocket(KeyStore* aKeyStore) +: mKeyStore(aKeyStore) +{ + MOZ_ASSERT(mKeyStore); + + MOZ_COUNT_CTOR(KeyStore::StreamSocket); +} + +KeyStore::StreamSocket::~StreamSocket() +{ + MOZ_COUNT_DTOR(KeyStore::StreamSocket); +} + +void +KeyStore::StreamSocket::OnConnectSuccess() +{ + mKeyStore->OnConnectSuccess(STREAM_SOCKET); +} + +void +KeyStore::StreamSocket::OnConnectError() +{ + mKeyStore->OnConnectError(STREAM_SOCKET); +} + +void +KeyStore::StreamSocket::OnDisconnect() +{ + mKeyStore->OnDisconnect(STREAM_SOCKET); +} + +void +KeyStore::StreamSocket::ReceiveSocketData( + nsAutoPtr& aMessage) +{ + mKeyStore->ReceiveSocketData(aMessage); +} + +ConnectionOrientedSocketIO* +KeyStore::StreamSocket::GetIO() +{ + return PrepareAccept(new KeyStoreConnector()); +} + +// +// KeyStore +// + KeyStore::KeyStore() +: mShutdown(false) { MOZ_COUNT_CTOR(KeyStore); ::startKeyStoreService(); @@ -379,19 +464,45 @@ KeyStore::KeyStore() KeyStore::~KeyStore() { MOZ_COUNT_DTOR(KeyStore); + + MOZ_ASSERT(!mListenSocket); + MOZ_ASSERT(!mStreamSocket); } void KeyStore::Shutdown() { + // We set mShutdown first, so that |OnDisconnect| won't try to reconnect. mShutdown = true; - CloseSocket(); + + if (mStreamSocket) { + mStreamSocket->Close(); + mStreamSocket = nullptr; + } + if (mListenSocket) { + mListenSocket->Close(); + mListenSocket = nullptr; + } } void KeyStore::Listen() { - ListenSocket(new KeyStoreConnector()); + // We only allocate one |StreamSocket|, but re-use it for every connection. + if (mStreamSocket) { + mStreamSocket->Close(); + } else { + mStreamSocket = new StreamSocket(this); + } + + if (!mListenSocket) { + // We only ever allocate one |ListenSocket|... + mListenSocket = new ListenSocket(this); + mListenSocket->Listen(new KeyStoreConnector(), mStreamSocket); + } else { + // ... but keep it open. + mListenSocket->Listen(mStreamSocket); + } ResetHandlerInfo(); } @@ -512,25 +623,29 @@ KeyStore::ReadData(UnixSocketRawData *aMessage) void KeyStore::SendResponse(ResponseCode aResponse) { + MOZ_ASSERT(mStreamSocket); + if (aResponse == NO_RESPONSE) return; uint8_t response = (uint8_t)aResponse; UnixSocketRawData* data = new UnixSocketRawData((const void *)&response, 1); - SendSocketData(data); + mStreamSocket->SendSocketData(data); } // Data response void KeyStore::SendData(const uint8_t *aData, int aLength) { + MOZ_ASSERT(mStreamSocket); + unsigned short dataLength = htons(aLength); UnixSocketRawData* length = new UnixSocketRawData((const void *)&dataLength, 2); - SendSocketData(length); + mStreamSocket->SendSocketData(length); UnixSocketRawData* data = new UnixSocketRawData((const void *)aData, aLength); - SendSocketData(data); + mStreamSocket->SendSocketData(data); } void @@ -583,24 +698,43 @@ KeyStore::ReceiveSocketData(nsAutoPtr& aMessage) } void -KeyStore::OnConnectSuccess() +KeyStore::OnConnectSuccess(SocketType aSocketType) { - mShutdown = false; + if (aSocketType == STREAM_SOCKET) { + mShutdown = false; + } } void -KeyStore::OnConnectError() +KeyStore::OnConnectError(SocketType aSocketType) { - if (!mShutdown) { + if (mShutdown) { + return; + } + + if (aSocketType == STREAM_SOCKET) { + // Stream socket error; start listening again Listen(); } } void -KeyStore::OnDisconnect() +KeyStore::OnDisconnect(SocketType aSocketType) { - if (!mShutdown) { - Listen(); + if (mShutdown) { + return; + } + + switch (aSocketType) { + case LISTEN_SOCKET: + // Listen socket disconnected; start anew. + mListenSocket = nullptr; + Listen(); + break; + case STREAM_SOCKET: + // Stream socket disconnected; start listening again. + Listen(); + break; } } diff --git a/ipc/keystore/KeyStore.h b/ipc/keystore/KeyStore.h index 887c9d8b17a..ebcf5e32359 100644 --- a/ipc/keystore/KeyStore.h +++ b/ipc/keystore/KeyStore.h @@ -7,11 +7,12 @@ #ifndef mozilla_ipc_KeyStore_h #define mozilla_ipc_KeyStore_h 1 -#include "mozilla/ipc/UnixSocket.h" #include #include - #include "cert.h" +#include "mozilla/ipc/ListenSocket.h" +#include "mozilla/ipc/StreamSocket.h" +#include "mozilla/ipc/UnixSocketConnector.h" namespace mozilla { namespace ipc { @@ -94,21 +95,69 @@ public: nsAString& aAddrStr); }; -class KeyStore : public mozilla::ipc::UnixSocketConsumer +class KeyStore MOZ_FINAL { public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(KeyStore) + KeyStore(); void Shutdown(); private: - virtual ~KeyStore(); + enum SocketType { + LISTEN_SOCKET, + STREAM_SOCKET + }; - virtual void ReceiveSocketData(nsAutoPtr& aMessage); + class ListenSocket MOZ_FINAL : public mozilla::ipc::ListenSocket + { + public: + ListenSocket(KeyStore* aKeyStore); + ListenSocket(); - virtual void OnConnectSuccess(); - virtual void OnConnectError(); - virtual void OnDisconnect(); + // SocketBase + // + + void OnConnectSuccess() MOZ_OVERRIDE; + void OnConnectError() MOZ_OVERRIDE; + void OnDisconnect() MOZ_OVERRIDE; + + private: + KeyStore* mKeyStore; + }; + + class StreamSocket MOZ_FINAL : public mozilla::ipc::StreamSocket + { + public: + StreamSocket(KeyStore* aKeyStore); + ~StreamSocket(); + + // SocketConsumerBase + // + + void OnConnectSuccess() MOZ_OVERRIDE; + void OnConnectError() MOZ_OVERRIDE; + void OnDisconnect() MOZ_OVERRIDE; + + void ReceiveSocketData(nsAutoPtr& aMessage) MOZ_OVERRIDE; + + // ConnectionOrientedSocket + // + + ConnectionOrientedSocketIO* GetIO() MOZ_OVERRIDE; + + private: + KeyStore* mKeyStore; + }; + + ~KeyStore(); + + void ReceiveSocketData(nsAutoPtr& aMessage); + + void OnConnectSuccess(enum SocketType aSocketType); + void OnConnectError(enum SocketType aSocketType); + void OnDisconnect(enum SocketType aSocketType); struct { ProtocolHandlerState state; @@ -128,6 +177,9 @@ private: void SendData(const uint8_t *data, int length); bool mShutdown; + + nsRefPtr mListenSocket; + nsRefPtr mStreamSocket; }; } // namespace ipc From 398c852277a27fbfad29911d882055500be965a1 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Wed, 3 Dec 2014 16:43:15 +0100 Subject: [PATCH 14/31] Backed out changeset fb224386bea8 (bug 1003848) for bustage on a CLOSED TREE --- dom/base/nsFrameLoader.cpp | 25 -------------- dom/browser-element/BrowserElementChild.js | 13 +++++-- dom/browser-element/BrowserElementParent.js | 8 +++++ ...rowserElement_SetVisibleFrames2_Outer.html | 4 +++ dom/ipc/PBrowser.ipdl | 8 ----- dom/ipc/TabChild.cpp | 34 ++----------------- dom/ipc/TabChild.h | 3 -- dom/ipc/TabParent.cpp | 14 +------- 8 files changed, 26 insertions(+), 83 deletions(-) diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index 14873d855b7..e5f142f8279 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -52,7 +52,6 @@ #include "nsIPermissionManager.h" #include "nsISHistory.h" #include "nsNullPrincipal.h" -#include "nsIScriptError.h" #include "nsLayoutUtils.h" #include "nsView.h" @@ -1763,30 +1762,6 @@ nsFrameLoader::MaybeCreateDocShell() NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js"), /* allowDelayedLoad = */ true, /* aRunInGlobalScope */ true); - // For inproc frames, set the docshell properties. - nsCOMPtr item = do_GetInterface(docShell); - nsAutoString name; - if (mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name)) { - item->SetName(name); - } - mDocShell->SetFullscreenAllowed( - mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) || - mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)); - bool isPrivate = mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing); - if (isPrivate) { - bool nonBlank; - mDocShell->GetHasLoadedNonBlankURI(&nonBlank); - if (nonBlank) { - nsContentUtils::ReportToConsoleNonLocalized( - NS_LITERAL_STRING("We should not switch to Private Browsing after loading a document."), - nsIScriptError::warningFlag, - NS_LITERAL_CSTRING("mozprivatebrowsing"), - nullptr); - } else { - nsCOMPtr context = do_GetInterface(mDocShell); - context->SetUsePrivateBrowsing(true); - } - } } return NS_OK; diff --git a/dom/browser-element/BrowserElementChild.js b/dom/browser-element/BrowserElementChild.js index 81747115e43..4996b178e0f 100644 --- a/dom/browser-element/BrowserElementChild.js +++ b/dom/browser-element/BrowserElementChild.js @@ -52,5 +52,14 @@ if (!('BrowserElementIsPreloaded' in this)) { var BrowserElementIsReady = true; - -sendAsyncMessage('browser-element-api:call', { 'msg_name': 'hello' }); +let infos = sendSyncMessage('browser-element-api:call', + { 'msg_name': 'hello' })[0]; +docShell.QueryInterface(Ci.nsIDocShellTreeItem).name = infos.name; +docShell.setFullscreenAllowed(infos.fullscreenAllowed); +if (infos.isPrivate) { + if (docShell.hasLoadedNonBlankURI) { + Cu.reportError("We should not switch to Private Browsing after loading a document."); + } else { + docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = true; + } +} diff --git a/dom/browser-element/BrowserElementParent.js b/dom/browser-element/BrowserElementParent.js index 42f9a94c267..038434fa1f5 100644 --- a/dom/browser-element/BrowserElementParent.js +++ b/dom/browser-element/BrowserElementParent.js @@ -325,6 +325,14 @@ BrowserElementParent.prototype = { this._domRequestReady = true; this._runPendingAPICall(); } + + return { + name: this._frameElement.getAttribute('name'), + fullscreenAllowed: + this._frameElement.hasAttribute('allowfullscreen') || + this._frameElement.hasAttribute('mozallowfullscreen'), + isPrivate: this._frameElement.hasAttribute('mozprivatebrowsing') + }; }, _fireCtxMenuEvent: function(data) { diff --git a/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html b/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html index c4fa25d26bb..3694f621705 100644 --- a/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html +++ b/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html @@ -15,6 +15,10 @@ iframe.addEventListener('mozbrowsershowmodalprompt', function(e) { }, 0); }, 0); } + else { + // Pass the message up to our parent. + alert(e.detail.message); + } }); document.body.appendChild(iframe); diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index aec8a18047c..93f34ffa8df 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -69,13 +69,6 @@ union MaybeNativeKeyBinding void_t; }; -struct ShowInfo -{ - nsString name; - bool fullscreenAllowed; - bool isPrivate; -}; - prio(normal upto urgent) intr protocol PBrowser { manager PContent or PContentBridge; @@ -418,7 +411,6 @@ child: * point. */ Show(nsIntSize size, - ShowInfo info, ScrollingBehavior scrolling, TextureFactoryIdentifier textureFactoryIdentifier, uint64_t layersId, diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 15da283b5ab..7d850ba69dc 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1881,36 +1881,10 @@ TabChild::DoFakeShow(const ScrollingBehavior& aScrolling, const uint64_t& aLayersId, PRenderFrameChild* aRenderFrame) { - ShowInfo info(EmptyString(), false, false); - RecvShow(nsIntSize(0, 0), info, aScrolling, aTextureFactoryIdentifier, aLayersId, aRenderFrame); + RecvShow(nsIntSize(0, 0), aScrolling, aTextureFactoryIdentifier, aLayersId, aRenderFrame); mDidFakeShow = true; } -void -TabChild::ApplyShowInfo(const ShowInfo& aInfo) -{ - nsCOMPtr docShell = do_GetInterface(WebNavigation()); - if (docShell) { - nsCOMPtr item = do_GetInterface(docShell); - item->SetName(aInfo.name()); - docShell->SetFullscreenAllowed(aInfo.fullscreenAllowed()); - if (aInfo.isPrivate()) { - bool nonBlank; - docShell->GetHasLoadedNonBlankURI(&nonBlank); - if (nonBlank) { - nsContentUtils::ReportToConsoleNonLocalized( - NS_LITERAL_STRING("We should not switch to Private Browsing after loading a document."), - nsIScriptError::warningFlag, - NS_LITERAL_CSTRING("mozprivatebrowsing"), - nullptr); - } else { - nsCOMPtr context = do_GetInterface(docShell); - context->SetUsePrivateBrowsing(true); - } - } - } -} - #ifdef MOZ_WIDGET_GONK void TabChild::MaybeRequestPreinitCamera() @@ -1971,7 +1945,6 @@ TabChild::MaybeRequestPreinitCamera() bool TabChild::RecvShow(const nsIntSize& aSize, - const ShowInfo& aInfo, const ScrollingBehavior& aScrolling, const TextureFactoryIdentifier& aTextureFactoryIdentifier, const uint64_t& aLayersId, @@ -1980,7 +1953,6 @@ TabChild::RecvShow(const nsIntSize& aSize, MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame)); if (mDidFakeShow) { - ApplyShowInfo(aInfo); return true; } @@ -2004,9 +1976,7 @@ TabChild::RecvShow(const nsIntSize& aSize, MaybeRequestPreinitCamera(); #endif - bool res = InitTabChildGlobal(); - ApplyShowInfo(aInfo); - return res; + return InitTabChildGlobal(); } bool diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 8b84a78fdd2..ff0243a5e5e 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -317,7 +317,6 @@ public: const FileDescriptor& aFileDescriptor) MOZ_OVERRIDE; virtual bool RecvShow(const nsIntSize& aSize, - const ShowInfo& aInfo, const ScrollingBehavior& aScrolling, const TextureFactoryIdentifier& aTextureFactoryIdentifier, const uint64_t& aLayersId, @@ -553,8 +552,6 @@ private: const uint64_t& aLayersId, PRenderFrameChild* aRenderFrame); - void ApplyShowInfo(const ShowInfo& aInfo); - // These methods are used for tracking synthetic mouse events // dispatched for compatibility. On each touch event, we // UpdateTapState(). If we've detected that the current gesture diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 0b065ce9585..7f9f1b4e68e 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -600,19 +600,7 @@ TabParent::Show(const nsIntSize& size) unused << SendPRenderFrameConstructor(renderFrame); } } - - ShowInfo info(EmptyString(), false, false); - if (mFrameElement) { - nsAutoString name; - mFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name); - bool allowFullscreen = - mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) || - mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen); - bool isPrivate = mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing); - info = ShowInfo(name, allowFullscreen, isPrivate); - } - - unused << SendShow(size, info, scrolling, textureFactoryIdentifier, layersId, renderFrame); + unused << SendShow(size, scrolling, textureFactoryIdentifier, layersId, renderFrame); } void From 5b5149f3ab83ee6529f97f106e184ec49b1e7eb8 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 08:26:58 -0800 Subject: [PATCH 15/31] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/0ae26861a352 Author: albertopq Desc: Merge pull request #26528 from albertopq/1105671-rtl-sim-slot Bug 1105671 - RTL sim slot numbers should stay LTR r=gmarty ======== https://hg.mozilla.org/integration/gaia-central/rev/5267b43767b5 Author: albertopq Desc: Bug 1105671 - RTL sim slot numbers should stay LTR ======== https://hg.mozilla.org/integration/gaia-central/rev/3f67b84bae3d Author: albertopq Desc: Merge pull request #26529 from albertopq/1091484-reenable-test Bug 1091484 - Fixing intermitent test notifications r=dharvey ======== https://hg.mozilla.org/integration/gaia-central/rev/6b0ff5e1c8fb Author: albertopq Desc: Bug 1091484 - Fixing intermitent test notifications --- 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 5e8dee54745..c57f08d64eb 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "e0e95c183727a5914b8420fa5e84bf5e17cb8eae", + "revision": "0ae26861a3524f8822ce2a5375031d779b0445a7", "repo_path": "integration/gaia-central" } From 75e88f7137da678a39271f86ab87cf03c1e1d3e9 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 08:28:33 -0800 Subject: [PATCH 16/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 640bc6aeb86..559806f43ec 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index b41ab2831a3..a2d3b04044c 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 91ae7be15a6..ad6b21a0954 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 26881091b83..58fc5024df5 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index b41ab2831a3..a2d3b04044c 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 0336ebfa5d2..c7ffc150643 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 17ae2fa1d71..a2da2c339f7 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 6d1f1b70394..961f7c5df18 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 8e70565f719..4317dd94c35 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 9523a9497ab..de7b724557c 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 1fbad80d1ae..8dbdcf7cf7d 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 10b2fef7f66bdb4b7cdd2d4ae2a4b067e66fe507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Mon, 24 Nov 2014 11:05:35 -0800 Subject: [PATCH 17/31] Bug 1003848 - Don't use sync messaging during BrowserElementChild initialization r=smaug --- dom/base/nsFrameLoader.cpp | 25 +++++++++++++ dom/browser-element/BrowserElementChild.js | 13 ++----- dom/browser-element/BrowserElementParent.js | 8 ----- ...rowserElement_SetVisibleFrames2_Outer.html | 4 --- dom/ipc/PBrowser.ipdl | 8 +++++ dom/ipc/TabChild.cpp | 35 +++++++++++++++++-- dom/ipc/TabChild.h | 3 ++ dom/ipc/TabParent.cpp | 14 +++++++- 8 files changed, 84 insertions(+), 26 deletions(-) diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index e5f142f8279..14873d855b7 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -52,6 +52,7 @@ #include "nsIPermissionManager.h" #include "nsISHistory.h" #include "nsNullPrincipal.h" +#include "nsIScriptError.h" #include "nsLayoutUtils.h" #include "nsView.h" @@ -1762,6 +1763,30 @@ nsFrameLoader::MaybeCreateDocShell() NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js"), /* allowDelayedLoad = */ true, /* aRunInGlobalScope */ true); + // For inproc frames, set the docshell properties. + nsCOMPtr item = do_GetInterface(docShell); + nsAutoString name; + if (mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name)) { + item->SetName(name); + } + mDocShell->SetFullscreenAllowed( + mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) || + mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)); + bool isPrivate = mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing); + if (isPrivate) { + bool nonBlank; + mDocShell->GetHasLoadedNonBlankURI(&nonBlank); + if (nonBlank) { + nsContentUtils::ReportToConsoleNonLocalized( + NS_LITERAL_STRING("We should not switch to Private Browsing after loading a document."), + nsIScriptError::warningFlag, + NS_LITERAL_CSTRING("mozprivatebrowsing"), + nullptr); + } else { + nsCOMPtr context = do_GetInterface(mDocShell); + context->SetUsePrivateBrowsing(true); + } + } } return NS_OK; diff --git a/dom/browser-element/BrowserElementChild.js b/dom/browser-element/BrowserElementChild.js index 4996b178e0f..81747115e43 100644 --- a/dom/browser-element/BrowserElementChild.js +++ b/dom/browser-element/BrowserElementChild.js @@ -52,14 +52,5 @@ if (!('BrowserElementIsPreloaded' in this)) { var BrowserElementIsReady = true; -let infos = sendSyncMessage('browser-element-api:call', - { 'msg_name': 'hello' })[0]; -docShell.QueryInterface(Ci.nsIDocShellTreeItem).name = infos.name; -docShell.setFullscreenAllowed(infos.fullscreenAllowed); -if (infos.isPrivate) { - if (docShell.hasLoadedNonBlankURI) { - Cu.reportError("We should not switch to Private Browsing after loading a document."); - } else { - docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = true; - } -} + +sendAsyncMessage('browser-element-api:call', { 'msg_name': 'hello' }); diff --git a/dom/browser-element/BrowserElementParent.js b/dom/browser-element/BrowserElementParent.js index 038434fa1f5..42f9a94c267 100644 --- a/dom/browser-element/BrowserElementParent.js +++ b/dom/browser-element/BrowserElementParent.js @@ -325,14 +325,6 @@ BrowserElementParent.prototype = { this._domRequestReady = true; this._runPendingAPICall(); } - - return { - name: this._frameElement.getAttribute('name'), - fullscreenAllowed: - this._frameElement.hasAttribute('allowfullscreen') || - this._frameElement.hasAttribute('mozallowfullscreen'), - isPrivate: this._frameElement.hasAttribute('mozprivatebrowsing') - }; }, _fireCtxMenuEvent: function(data) { diff --git a/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html b/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html index 3694f621705..c4fa25d26bb 100644 --- a/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html +++ b/dom/browser-element/mochitest/file_browserElement_SetVisibleFrames2_Outer.html @@ -15,10 +15,6 @@ iframe.addEventListener('mozbrowsershowmodalprompt', function(e) { }, 0); }, 0); } - else { - // Pass the message up to our parent. - alert(e.detail.message); - } }); document.body.appendChild(iframe); diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index 93f34ffa8df..aec8a18047c 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -69,6 +69,13 @@ union MaybeNativeKeyBinding void_t; }; +struct ShowInfo +{ + nsString name; + bool fullscreenAllowed; + bool isPrivate; +}; + prio(normal upto urgent) intr protocol PBrowser { manager PContent or PContentBridge; @@ -411,6 +418,7 @@ child: * point. */ Show(nsIntSize size, + ShowInfo info, ScrollingBehavior scrolling, TextureFactoryIdentifier textureFactoryIdentifier, uint64_t layersId, diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 7d850ba69dc..cd343643580 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -90,6 +90,7 @@ #include "nsIAppsService.h" #include "nsNetUtil.h" #include "nsIPermissionManager.h" +#include "nsIScriptError.h" #define BROWSER_ELEMENT_CHILD_SCRIPT \ NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js") @@ -1881,10 +1882,36 @@ TabChild::DoFakeShow(const ScrollingBehavior& aScrolling, const uint64_t& aLayersId, PRenderFrameChild* aRenderFrame) { - RecvShow(nsIntSize(0, 0), aScrolling, aTextureFactoryIdentifier, aLayersId, aRenderFrame); + ShowInfo info(EmptyString(), false, false); + RecvShow(nsIntSize(0, 0), info, aScrolling, aTextureFactoryIdentifier, aLayersId, aRenderFrame); mDidFakeShow = true; } +void +TabChild::ApplyShowInfo(const ShowInfo& aInfo) +{ + nsCOMPtr docShell = do_GetInterface(WebNavigation()); + if (docShell) { + nsCOMPtr item = do_GetInterface(docShell); + item->SetName(aInfo.name()); + docShell->SetFullscreenAllowed(aInfo.fullscreenAllowed()); + if (aInfo.isPrivate()) { + bool nonBlank; + docShell->GetHasLoadedNonBlankURI(&nonBlank); + if (nonBlank) { + nsContentUtils::ReportToConsoleNonLocalized( + NS_LITERAL_STRING("We should not switch to Private Browsing after loading a document."), + nsIScriptError::warningFlag, + NS_LITERAL_CSTRING("mozprivatebrowsing"), + nullptr); + } else { + nsCOMPtr context = do_GetInterface(docShell); + context->SetUsePrivateBrowsing(true); + } + } + } +} + #ifdef MOZ_WIDGET_GONK void TabChild::MaybeRequestPreinitCamera() @@ -1945,6 +1972,7 @@ TabChild::MaybeRequestPreinitCamera() bool TabChild::RecvShow(const nsIntSize& aSize, + const ShowInfo& aInfo, const ScrollingBehavior& aScrolling, const TextureFactoryIdentifier& aTextureFactoryIdentifier, const uint64_t& aLayersId, @@ -1953,6 +1981,7 @@ TabChild::RecvShow(const nsIntSize& aSize, MOZ_ASSERT((!mDidFakeShow && aRenderFrame) || (mDidFakeShow && !aRenderFrame)); if (mDidFakeShow) { + ApplyShowInfo(aInfo); return true; } @@ -1976,7 +2005,9 @@ TabChild::RecvShow(const nsIntSize& aSize, MaybeRequestPreinitCamera(); #endif - return InitTabChildGlobal(); + bool res = InitTabChildGlobal(); + ApplyShowInfo(aInfo); + return res; } bool diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index ff0243a5e5e..8b84a78fdd2 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -317,6 +317,7 @@ public: const FileDescriptor& aFileDescriptor) MOZ_OVERRIDE; virtual bool RecvShow(const nsIntSize& aSize, + const ShowInfo& aInfo, const ScrollingBehavior& aScrolling, const TextureFactoryIdentifier& aTextureFactoryIdentifier, const uint64_t& aLayersId, @@ -552,6 +553,8 @@ private: const uint64_t& aLayersId, PRenderFrameChild* aRenderFrame); + void ApplyShowInfo(const ShowInfo& aInfo); + // These methods are used for tracking synthetic mouse events // dispatched for compatibility. On each touch event, we // UpdateTapState(). If we've detected that the current gesture diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 7f9f1b4e68e..0b065ce9585 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -600,7 +600,19 @@ TabParent::Show(const nsIntSize& size) unused << SendPRenderFrameConstructor(renderFrame); } } - unused << SendShow(size, scrolling, textureFactoryIdentifier, layersId, renderFrame); + + ShowInfo info(EmptyString(), false, false); + if (mFrameElement) { + nsAutoString name; + mFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name); + bool allowFullscreen = + mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) || + mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen); + bool isPrivate = mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing); + info = ShowInfo(name, allowFullscreen, isPrivate); + } + + unused << SendShow(size, info, scrolling, textureFactoryIdentifier, layersId, renderFrame); } void From 55868c7ab4a483d4b32a120773d769e831a5303f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 09:16:58 -0800 Subject: [PATCH 18/31] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/f2dfe6bee72f Author: John Hu Desc: Merge pull request #26477 from huchengtw-moz/bug-1104650-focus-lost-after-activity Bug 1104650 - [Stingray] switch focus to activity's parent window when i..., r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/058666608792 Author: John Hu Desc: Bug 1104650 - [Stingray] switch focus to activity's parent window when it is killed. --- 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 c57f08d64eb..b8ca4a204af 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "0ae26861a3524f8822ce2a5375031d779b0445a7", + "revision": "f2dfe6bee72f2dc020c22755186579005af33a8c", "repo_path": "integration/gaia-central" } From 42dc4552d2ac1074bea59f2b3306c17f633ac93a Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 09:21:34 -0800 Subject: [PATCH 19/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 559806f43ec..c586ef6035c 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a2d3b04044c..a4d2433cd03 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index ad6b21a0954..88a20c59bc4 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 58fc5024df5..49f7e9ec160 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a2d3b04044c..a4d2433cd03 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index c7ffc150643..274376f32d9 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index a2da2c339f7..162eab832fa 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 961f7c5df18..cfd349f091d 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 4317dd94c35..80b217691da 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index de7b724557c..a08456680d3 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 8dbdcf7cf7d..23b7f96dd8b 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 47353767a0ac78cc40304f982c845921f97c5159 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 09:38:37 -0800 Subject: [PATCH 20/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index c586ef6035c..f8dcc937d8c 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a4d2433cd03..a6f6ceec8de 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -25,7 +25,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 88a20c59bc4..c6509bcdddc 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 49f7e9ec160..0d835b70c70 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a4d2433cd03..a6f6ceec8de 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -25,7 +25,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 274376f32d9..eab604190e7 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 162eab832fa..143230cd1c7 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index cfd349f091d..4128fdaf8ff 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -21,7 +21,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index a08456680d3..b1b878a8ed5 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 23b7f96dd8b..d3daa9464f4 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -22,7 +22,7 @@ - + From a116469f30158e2251260d35f47f6dec1ac99d9f Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Wed, 3 Dec 2014 10:50:46 -0800 Subject: [PATCH 21/31] Bug 1098470 - Move manifest.* scope from navigator.getFeature to navigator.hasFeature. r=ehsan --- dom/base/Navigator.cpp | 26 ++++++++++---------- dom/base/test/test_getFeature_with_perm.html | 19 +++++++++++--- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index ade5c650223..1ba5d75ea83 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -1414,6 +1414,19 @@ Navigator::GetFeature(const nsAString& aName, ErrorResult& aRv) } // hardware.memory #endif + p->MaybeResolve(JS::UndefinedHandleValue); + return p.forget(); +} + +already_AddRefed +Navigator::HasFeature(const nsAString& aName, ErrorResult& aRv) +{ + nsCOMPtr go = do_QueryInterface(mWindow); + nsRefPtr p = Promise::Create(go, aRv); + if (aRv.Failed()) { + return nullptr; + } + // Hardcoded manifest features. Some are still b2g specific. const char manifestFeatures[][64] = { "manifest.origin" @@ -1432,19 +1445,6 @@ Navigator::GetFeature(const nsAString& aName, ErrorResult& aRv) } } - p->MaybeResolve(JS::UndefinedHandleValue); - return p.forget(); -} - -already_AddRefed -Navigator::HasFeature(const nsAString& aName, ErrorResult& aRv) -{ - nsCOMPtr go = do_QueryInterface(mWindow); - nsRefPtr p = Promise::Create(go, aRv); - if (aRv.Failed()) { - return nullptr; - } - NS_NAMED_LITERAL_STRING(apiWindowPrefix, "api.window."); if (StringBeginsWith(aName, apiWindowPrefix)) { const nsAString& featureName = Substring(aName, apiWindowPrefix.Length()); diff --git a/dom/base/test/test_getFeature_with_perm.html b/dom/base/test/test_getFeature_with_perm.html index af31a4fec32..41ad4921d1d 100644 --- a/dom/base/test/test_getFeature_with_perm.html +++ b/dom/base/test/test_getFeature_with_perm.html @@ -51,18 +51,27 @@ function testNotSupported() { ok(typeof tv === 'undefined', "Resolve the Promise with undefined value (hardware.tv)"); runNextTest(); },function(tv) { - ok(false, "The Promise should not be rejected") + ok(false, "The Promise should not be rejected"); + }); +} + +function testNotSupportedManifest() { + navigator.getFeature("manifest.origin").then(function(feature) { + ok(typeof feature == 'undefined', "manifest.* resolves with undefined on getFeature"); + runNextTest(); + }, function() { + ok(false, "The Promise should not be rejected"); }); } function createManifestTest(aFeature) { return function() { var res; - navigator.getFeature(aFeature).then(function(res) { + navigator.hasFeature(aFeature).then(function(res) { ok(res === true, "Resolve the Promise with 'true' for " + aFeature); runNextTest(); - },function(tv) { - ok(false, "The Promise should not be rejected") + }, function(tv) { + ok(false, "The Promise should not be rejected"); }); } } @@ -70,6 +79,7 @@ function createManifestTest(aFeature) { var currentTest = -1; var tests = [ testNotSupported, + testNotSupportedManifest, testSupported, createManifestTest("manifest.origin"), createManifestTest("manifest.redirects") @@ -90,6 +100,7 @@ SpecialPowers.pushPermissions([ {type: "feature-detection", allow: 1, context: document} ], function() { ok('getFeature' in navigator, "navigator.getFeature should exist"); + ok('hasFeature' in navigator, "navigator.hasFeature should exist"); // B2G specific manifest features. // Touching navigator before pushPermissions makes it fail. if (!navigator.userAgent.contains("Android") && From 9f3073088b336da6c1211acdf17c38878308b53c Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 11:11:56 -0800 Subject: [PATCH 22/31] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/f5b674549305 Author: Ryan VanderMeulen Desc: Merge pull request #26468 from mancas/bug1105032 Bug 1105032 - Keyboard is overlapping SIM PIN dialog buttons with SHB en... ======== https://hg.mozilla.org/integration/gaia-central/rev/68a3666233be Author: Manuel Desc: Bug 1105032 - Keyboard is overlapping SIM PIN dialog buttons with SHB enabled ======== https://hg.mozilla.org/integration/gaia-central/rev/64b01ade6878 Author: Ryan VanderMeulen Desc: Merge pull request #26438 from mancas/bug1102550 Bug 1102550 - [FTU] Enabling Airplane Mode via Power Menu and refreshing... ======== https://hg.mozilla.org/integration/gaia-central/rev/f0853aadae50 Author: Manuel Desc: Bug 1102550 - [FTU] Enabling Airplane Mode via Power Menu and refreshing Wi-Fi Connections can block User --- 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 b8ca4a204af..68ccdebe72b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "f2dfe6bee72f2dc020c22755186579005af33a8c", + "revision": "f5b674549305584de0d3ea3c863d95a5704b0186", "repo_path": "integration/gaia-central" } From a586f063d7c725779a6e24fc77edec31505a03ed Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 11:13:30 -0800 Subject: [PATCH 23/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f8dcc937d8c..2f263e6f357 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a6f6ceec8de..a6591e65e6f 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index c6509bcdddc..06f77c00d96 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 0d835b70c70..4765ec6dea2 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a6f6ceec8de..a6591e65e6f 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index eab604190e7..eb5b86f530d 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 143230cd1c7..254257d43a4 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 4128fdaf8ff..8486fe9da48 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 80b217691da..44c24458e55 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index b1b878a8ed5..c3cd3dbf805 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index d3daa9464f4..5f443c3ea3d 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 48314d12b240965195f076591df4bb9ebe1babcb Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 17:22:03 -0800 Subject: [PATCH 24/31] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/6215881c830f Author: Guillaume C. Marty Desc: Merge pull request #26608 from gmarty/Bug-998328-update-gaia-icons Bug 998328 - Update gaia-icons to the latest version ======== https://hg.mozilla.org/integration/gaia-central/rev/da4f3e00edd3 Author: Guillaume Marty Desc: Bug 998328 - Update gaia-icons to the latest version --- 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 68ccdebe72b..2a537d5159c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "f5b674549305584de0d3ea3c863d95a5704b0186", + "revision": "6215881c830f391f38ea14d3b336174d4f69ad99", "repo_path": "integration/gaia-central" } From ca035161383c01f97715a6af88e913751a880a72 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 17:26:38 -0800 Subject: [PATCH 25/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 2f263e6f357..674aba63265 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a6591e65e6f..309bc517e7b 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 06f77c00d96..cecc9e84b07 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 4765ec6dea2..c53e1f73dc3 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a6591e65e6f..309bc517e7b 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index eb5b86f530d..8195d870a92 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 254257d43a4..481d4c0dbd7 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 8486fe9da48..86c90d50ed6 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 44c24458e55..d58ccd3cb4f 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index c3cd3dbf805..1d3b525ea12 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 5f443c3ea3d..0366c6c9b5e 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From a740a4ecf054a599bc18a1aa06ac21a013214dff Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 17:52:00 -0800 Subject: [PATCH 26/31] Bumping gaia.json for 9 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/8bc756153f52 Author: Yoshi Huang Desc: Merge pull request #26517 from allstarschh/Bug1103732b Bug 1103732 - remove getNFCPeer. r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/cc856f604ede Author: Yoshi Huang Desc: Bug 1103732 - remove getNFCPeer ======== https://hg.mozilla.org/integration/gaia-central/rev/103ba3634733 Author: Yoshi Huang Desc: Merge pull request #26503 from allstarschh/Bug1048676_1125b Bug1048676 - use nfc-share and nfc permission. r=alive, dkuo, arthurcc, francisco ======== https://hg.mozilla.org/integration/gaia-central/rev/dd4c07b53859 Author: Yoshi Huang Desc: Bug 1048676 - Part 6: use nfc-share in communication app. ======== https://hg.mozilla.org/integration/gaia-central/rev/b78c381de85b Author: Yoshi Huang Desc: Bug 1048676 - Part 5: use nfc permission in Settings app. ======== https://hg.mozilla.org/integration/gaia-central/rev/6d41dd0a52e9 Author: Yoshi Huang Desc: Bug 1048676 - Part 4: use nfc-share permission in Music app. ======== https://hg.mozilla.org/integration/gaia-central/rev/ccd81045cf54 Author: Yoshi Huang Desc: Bug 1048676 - Part 3: use nfc-share permission in Gallery app. ======== https://hg.mozilla.org/integration/gaia-central/rev/e34c91bd0397 Author: Yoshi Huang Desc: Bug 1048676 - Part 2: use nfc-share permission in Video app. ======== https://hg.mozilla.org/integration/gaia-central/rev/e086242feb7a Author: Yoshi Huang Desc: Bug 1048676 - Part 1: use nfc-share permission in System app. --- 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 2a537d5159c..3fd7e9d770c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "6215881c830f391f38ea14d3b336174d4f69ad99", + "revision": "8bc756153f52bfaeeb18c0df6a363a8d2cfb1c31", "repo_path": "integration/gaia-central" } From 8127921a81feea3ad1c05c13bac085613b2a7a78 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 17:56:35 -0800 Subject: [PATCH 27/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 674aba63265..f713d10d7d5 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 309bc517e7b..12cd9e39b3f 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index cecc9e84b07..1c74045a1ff 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index c53e1f73dc3..e619ed3c4ac 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 309bc517e7b..12cd9e39b3f 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 8195d870a92..3d219092fb1 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 481d4c0dbd7..124b9b51ad3 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 86c90d50ed6..994e5c4c670 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index d58ccd3cb4f..6a8c94bb69e 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 1d3b525ea12..fe68027047c 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 0366c6c9b5e..2780c0a5690 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From b8bd59e45d9aca59e5255e1ba06d617903500765 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 18:41:58 -0800 Subject: [PATCH 28/31] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/3b76779650c6 Author: autolander Desc: Bug 1102967 - merge pull request #26597 from KevinGrandon:bug_1102967_give_me_button to mozilla-b2g:master ======== https://hg.mozilla.org/integration/gaia-central/rev/7ce5fa9bee65 Author: Kevin Grandon Desc: Bug 1102967 - Cram unread button in message UI --- 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 3fd7e9d770c..6f14c178eb2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "8bc756153f52bfaeeb18c0df6a363a8d2cfb1c31", + "revision": "3b76779650c6fe30a381809e77ff4772ad8d9cf2", "repo_path": "integration/gaia-central" } From d3516d09c7333b2a9a84924653ecd8d6bc4ee93f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Wed, 3 Dec 2014 18:43:32 -0800 Subject: [PATCH 29/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f713d10d7d5..0f1f1db28f9 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 12cd9e39b3f..3b858c44163 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 1c74045a1ff..95230f22969 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index e619ed3c4ac..c76e4c67eb9 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 12cd9e39b3f..3b858c44163 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 3d219092fb1..ff114d783aa 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 124b9b51ad3..2b78a659a73 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 994e5c4c670..dc54bede83a 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 6a8c94bb69e..a1d7bdacb72 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index fe68027047c..3fb1c1a1106 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 2780c0a5690..b161a830c34 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From e23e81366a6e0360db7a872df6a08ea206a35543 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 4 Dec 2014 01:01:56 -0800 Subject: [PATCH 30/31] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/9a69c3f26819 Author: viorelaioia Desc: Merge pull request #26604 from chirarobert/bug_1107086 Bug 1107086 - [v2.2] Fix test_sms_with_attachments.py failure ======== https://hg.mozilla.org/integration/gaia-central/rev/8ad722667c0f Author: Robert Chira Desc: Bug 1107086 - [v2.2] Fix test_sms_with_attachments.py failure --- 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 6f14c178eb2..810ac714a89 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "3b76779650c6fe30a381809e77ff4772ad8d9cf2", + "revision": "9a69c3f26819cc3ee8060307289ca8712d0c5e22", "repo_path": "integration/gaia-central" } From 32f189bece6c58b3a206b273d2e61d67c0a30243 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 4 Dec 2014 01:03:30 -0800 Subject: [PATCH 31/31] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 0f1f1db28f9..a5577693329 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 3b858c44163..b3ad3c8f40e 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 95230f22969..03b26ea2959 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index c76e4c67eb9..d97cfc53830 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 3b858c44163..b3ad3c8f40e 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index ff114d783aa..ac6d2482ac6 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 2b78a659a73..c08a0e3bfcd 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index dc54bede83a..7e1d371c8e0 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index a1d7bdacb72..2ccbce2c313 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 3fb1c1a1106..d3940be1ea1 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index b161a830c34..c5845d8a50e 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - +