From 3c342b867c56ab6bbe4fcfb24274fb795cc0868e Mon Sep 17 00:00:00 2001 From: Ghislain 'Aus' Lacroix Date: Thu, 31 Jul 2014 13:29:14 -0700 Subject: [PATCH 01/38] bug 1046876 - Define 'Cu'. r=gwagner --- dom/system/NetworkGeolocationProvider.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dom/system/NetworkGeolocationProvider.js b/dom/system/NetworkGeolocationProvider.js index a52d9c6e2533..e48bb9341d8b 100755 --- a/dom/system/NetworkGeolocationProvider.js +++ b/dom/system/NetworkGeolocationProvider.js @@ -7,6 +7,7 @@ Components.utils.import("resource://gre/modules/Services.jsm"); const Ci = Components.interfaces; const Cc = Components.classes; +const Cu = Components.utils; const POSITION_UNAVAILABLE = Ci.nsIDOMGeoPositionError.POSITION_UNAVAILABLE; const SETTINGS_DEBUG_ENABLED = "geolocation.debugging.enabled"; From be9dd03e7c9ec6bb666b5088746ce0ae2e532eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Wed, 30 Jul 2014 14:00:15 -0700 Subject: [PATCH 02/38] Bug 1042881 - ManifestHelper() must resolve uris against the manifest url r=myk --- b2g/chrome/content/shell.js | 3 +- b2g/components/AlertsHelper.jsm | 9 ++-- browser/modules/WebappManager.jsm | 7 ++- dom/activities/src/ActivitiesService.jsm | 5 +- dom/apps/src/AppsUtils.jsm | 46 ++++++++++------ dom/apps/src/PermissionsInstaller.jsm | 3 +- dom/apps/src/Webapps.jsm | 46 +++++++++------- dom/apps/tests/chrome.ini | 1 + dom/apps/tests/test_manifest_helper.xul | 52 +++++++++++++++++++ .../SystemMessagePermissionsChecker.jsm | 18 ++++--- mobile/android/chrome/content/WebappRT.js | 2 +- mobile/android/chrome/content/aboutApps.js | 2 +- mobile/android/modules/WebappManager.jsm | 9 ++-- toolkit/devtools/server/actors/webapps.js | 5 +- toolkit/webapps/NativeApp.jsm | 5 +- webapprt/WebappManager.jsm | 3 +- webapprt/WebappRT.jsm | 3 +- 17 files changed, 157 insertions(+), 62 deletions(-) create mode 100644 dom/apps/tests/test_manifest_helper.xul diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js index 2f73f42ac09d..885e38f7115a 100644 --- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -802,7 +802,8 @@ var WebappsHelper = { if (!aManifest) return; - let manifest = new ManifestHelper(aManifest, json.origin); + let manifest = new ManifestHelper(aManifest, json.origin, + json.manifestURL); let payload = { timestamp: json.timestamp, url: manifest.fullLaunchPath(json.startPoint), diff --git a/b2g/components/AlertsHelper.jsm b/b2g/components/AlertsHelper.jsm index 0089f381eca1..54d7a7112900 100644 --- a/b2g/components/AlertsHelper.jsm +++ b/b2g/components/AlertsHelper.jsm @@ -167,7 +167,8 @@ let AlertsHelper = { this._listeners[uid] = listener; appsService.getManifestFor(listener.manifestURL).then((manifest) => { - let helper = new ManifestHelper(manifest, listener.manifestURL); + let app = appsService.getAppByManifestURL(listener.manifestURL); + let helper = new ManifestHelper(manifest, app.origin, app.manifestURL); let getNotificationURLFor = function(messages) { if (!messages) { return null; @@ -179,8 +180,7 @@ let AlertsHelper = { return helper.fullLaunchPath(); } else if (typeof message === "object" && kNotificationSystemMessageName in message) { - return helper.resolveFromOrigin( - message[kNotificationSystemMessageName]); + return helper.resolveURL(message[kNotificationSystemMessageName]); } } @@ -220,7 +220,8 @@ let AlertsHelper = { // If we have a manifest URL, get the icon and title from the manifest // to prevent spoofing. appsService.getManifestFor(manifestURL).then((manifest) => { - let helper = new ManifestHelper(manifest, manifestURL); + let app = appsService.getAppByManifestURL(manifestURL); + let helper = new ManifestHelper(manifest, app.origin, manifestURL); send(helper.name, helper.iconURLForSize(kNotificationIconSize)); }); }, diff --git a/browser/modules/WebappManager.jsm b/browser/modules/WebappManager.jsm index 40de0ac3e611..ffc5d600d13a 100644 --- a/browser/modules/WebappManager.jsm +++ b/browser/modules/WebappManager.jsm @@ -66,7 +66,9 @@ this.WebappManager = { } } else if (aMessage.name == "Webapps:Install:Return:OK" && !data.isPackage) { - let manifest = new ManifestHelper(data.app.manifest, data.app.origin); + let manifest = new ManifestHelper(data.app.manifest, + data.app.origin, + data.app.manifestURL); if (!manifest.appcache_path) { this.installations[manifestURL].resolve(); } @@ -172,7 +174,8 @@ this.WebappManager = { }; let requestingURI = chromeWin.makeURI(aData.from); - let manifest = new ManifestHelper(jsonManifest, aData.app.origin); + let app = aData.app; + let manifest = new ManifestHelper(jsonManifest, app.origin, app.manifestURL); let host; try { diff --git a/dom/activities/src/ActivitiesService.jsm b/dom/activities/src/ActivitiesService.jsm index 91c353c6edd5..b91ae5cb5c23 100644 --- a/dom/activities/src/ActivitiesService.jsm +++ b/dom/activities/src/ActivitiesService.jsm @@ -294,7 +294,10 @@ let Activities = { let results = []; aManifests.forEach((aManifest, i) => { let manifestURL = aResults.options[i].manifest; - let helper = new ManifestHelper(aManifest.manifest, manifestURL); + // Not passing the origin is fine here since we only need + // helper.name which doesn't rely on url resolution. + let helper = + new ManifestHelper(aManifest.manifest, manifestURL, manifestURL); results.push({ manifestURL: manifestURL, iconURL: aResults.options[i].icon, diff --git a/dom/apps/src/AppsUtils.jsm b/dom/apps/src/AppsUtils.jsm index 1ae6a84aa2c1..31112180c5c2 100644 --- a/dom/apps/src/AppsUtils.jsm +++ b/dom/apps/src/AppsUtils.jsm @@ -24,7 +24,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", // Shared code for AppsServiceChild.jsm, Webapps.jsm and Webapps.js -this.EXPORTED_SYMBOLS = ["AppsUtils", "ManifestHelper", "isAbsoluteURI", "mozIApplication"]; +this.EXPORTED_SYMBOLS = + ["AppsUtils", "ManifestHelper", "isAbsoluteURI", "mozIApplication"]; function debug(s) { //dump("-*- AppsUtils.jsm: " + s + "\n"); @@ -373,7 +374,8 @@ this.AppsUtils = { // Nor through localized names if ('locales' in aNewManifest) { - let defaultName = new ManifestHelper(aOldManifest, aApp.origin).name; + let defaultName = + new ManifestHelper(aOldManifest, aApp.origin, aApp.manifestURL).name; for (let locale in aNewManifest.locales) { let entry = aNewManifest.locales[locale]; if (!entry.name) { @@ -593,11 +595,25 @@ this.AppsUtils = { /** * Helper object to access manifest information with locale support */ -this.ManifestHelper = function(aManifest, aOrigin) { - this._origin = Services.io.newURI(aOrigin, null, null); +this.ManifestHelper = function(aManifest, aOrigin, aManifestURL) { + // If the app is packaged, we resolve uris against the origin. + // If it's not, against the manifest url. + + if (!aOrigin || !aManifestURL) { + throw Error("ManifestHelper needs both origin and manifestURL"); + } + + this._baseURI = Services.io.newURI( + aOrigin.startsWith("app://") ? aOrigin : aManifestURL, null, null); + + // We keep the manifest url in all cases since we need it to + // resolve the package path for packaged apps. + this._manifestURL = Services.io.newURI(aManifestURL, null, null); + this._manifest = aManifest; - let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIXULChromeRegistry) - .QueryInterface(Ci.nsIToolkitChromeRegistry); + let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"] + .getService(Ci.nsIXULChromeRegistry) + .QueryInterface(Ci.nsIToolkitChromeRegistry); let locale = chrome.getSelectedLocale("global").toLowerCase(); this._localeRoot = this._manifest; @@ -686,7 +702,7 @@ ManifestHelper.prototype = { iconSizes.sort((a, b) => a - b); let biggestIconSize = iconSizes.pop(); let biggestIcon = icons[biggestIconSize]; - let biggestIconURL = this._origin.resolve(biggestIcon); + let biggestIconURL = this._baseURI.resolve(biggestIcon); return biggestIconURL; }, @@ -700,7 +716,7 @@ ManifestHelper.prototype = { for (let size in icons) { let iSize = parseInt(size); if (Math.abs(iSize - aSize) < dist) { - icon = this._origin.resolve(icons[size]); + icon = this._baseURI.resolve(icons[size]); dist = Math.abs(iSize - aSize); } } @@ -711,7 +727,7 @@ ManifestHelper.prototype = { // If no start point is specified, we use the root launch path. // In all error cases, we just return null. if ((aStartPoint || "") === "") { - return this._origin.resolve(this._localeProp("launch_path") || ""); + return this._baseURI.resolve(this._localeProp("launch_path") || "/"); } // Search for the l10n entry_points property. @@ -721,28 +737,28 @@ ManifestHelper.prototype = { } if (entryPoints[aStartPoint]) { - return this._origin.resolve(entryPoints[aStartPoint].launch_path || ""); + return this._baseURI.resolve(entryPoints[aStartPoint].launch_path || "/"); } return null; }, - resolveFromOrigin: function(aURI) { + resolveURL: function(aURI) { // This should be enforced higher up, but check it here just in case. if (isAbsoluteURI(aURI)) { - throw new Error("Webapps.jsm: non-relative URI passed to resolveFromOrigin"); + throw new Error("Webapps.jsm: non-relative URI passed to resolve"); } - return this._origin.resolve(aURI); + return this._baseURI.resolve(aURI); }, fullAppcachePath: function() { let appcachePath = this._localeProp("appcache_path"); - return this._origin.resolve(appcachePath ? appcachePath : ""); + return this._baseURI.resolve(appcachePath ? appcachePath : "/"); }, fullPackagePath: function() { let packagePath = this._localeProp("package_path"); - return this._origin.resolve(packagePath ? packagePath : ""); + return this._manifestURL.resolve(packagePath ? packagePath : "/"); }, get role() { diff --git a/dom/apps/src/PermissionsInstaller.jsm b/dom/apps/src/PermissionsInstaller.jsm index 4390c52c7195..015b34653bf4 100644 --- a/dom/apps/src/PermissionsInstaller.jsm +++ b/dom/apps/src/PermissionsInstaller.jsm @@ -59,7 +59,8 @@ this.PermissionsInstaller = { installPermissions: function installPermissions(aApp, aIsReinstall, aOnError, aIsSystemUpdate) { try { - let newManifest = new ManifestHelper(aApp.manifest, aApp.origin); + let newManifest = + new ManifestHelper(aApp.manifest, aApp.origin, aApp.manifestURL); if (!newManifest.permissions && !aIsReinstall) { return; } diff --git a/dom/apps/src/Webapps.jsm b/dom/apps/src/Webapps.jsm index 2fba41293edd..43c15bc3c267 100755 --- a/dom/apps/src/Webapps.jsm +++ b/dom/apps/src/Webapps.jsm @@ -389,7 +389,8 @@ this.DOMApplicationRegistry = { updateOfflineCacheForApp: function(aId) { let app = this.webapps[aId]; this._readManifests([{ id: aId }]).then((aResult) => { - let manifest = new ManifestHelper(aResult[0].manifest, app.origin); + let manifest = + new ManifestHelper(aResult[0].manifest, app.origin, app.manifestURL); OfflineCacheInstaller.installCache({ cachePath: app.cachePath, appId: aId, @@ -675,7 +676,7 @@ this.DOMApplicationRegistry = { return; } - let manifest = new ManifestHelper(aManifest, aApp.origin); + let manifest = new ManifestHelper(aManifest, aApp.origin, aApp.manifestURL); let launchPathURI = Services.io.newURI(manifest.fullLaunchPath(aEntryPoint), null, null); let manifestURI = Services.io.newURI(aApp.manifestURL, null, null); root.messages.forEach(function registerPages(aMessage) { @@ -689,7 +690,7 @@ this.DOMApplicationRegistry = { let fullHandlerPath; try { if (handlerPath && handlerPath.trim()) { - fullHandlerPath = manifest.resolveFromOrigin(handlerPath); + fullHandlerPath = manifest.resolveURL(handlerPath); } else { throw new Error("Empty or blank handler path."); } @@ -705,7 +706,7 @@ this.DOMApplicationRegistry = { if (SystemMessagePermissionsChecker .isSystemMessagePermittedToRegister(messageName, - aApp.origin, + aApp.manifestURL, aManifest)) { msgmgr.registerPage(messageName, handlerPageURI, manifestURI); } @@ -733,7 +734,7 @@ this.DOMApplicationRegistry = { return; } - let manifest = new ManifestHelper(aManifest, aApp.origin); + let manifest = new ManifestHelper(aManifest, aApp.origin, aApp.manifestURL); let launchPathURI = Services.io.newURI(manifest.fullLaunchPath(aEntryPoint), null, null); let manifestURI = Services.io.newURI(aApp.manifestURL, null, null); @@ -747,7 +748,7 @@ this.DOMApplicationRegistry = { let handlerPath = connection.handler_path; if (handlerPath) { try { - fullHandlerPath = manifest.resolveFromOrigin(handlerPath); + fullHandlerPath = manifest.resolveURL(handlerPath); } catch(e) { debug("Connection's handler path is invalid. Skipping: keyword: " + keyword + " handler_path: " + handlerPath); @@ -760,7 +761,7 @@ this.DOMApplicationRegistry = { if (SystemMessagePermissionsChecker .isSystemMessagePermittedToRegister("connection", - aApp.origin, + aApp.manifestURL, aManifest)) { msgmgr.registerPage("connection", handlerPageURI, manifestURI); } @@ -812,7 +813,7 @@ this.DOMApplicationRegistry = { return activitiesToRegister; } - let manifest = new ManifestHelper(aManifest, aApp.origin); + let manifest = new ManifestHelper(aManifest, aApp.origin, aApp.manifestURL); for (let activity in root.activities) { let description = root.activities[activity]; let href = description.href; @@ -821,7 +822,7 @@ this.DOMApplicationRegistry = { } try { - href = manifest.resolveFromOrigin(href); + href = manifest.resolveURL(href); } catch (e) { debug("Activity href (" + href + ") is invalid, skipping. " + "Error is: " + e); @@ -851,7 +852,7 @@ this.DOMApplicationRegistry = { if (SystemMessagePermissionsChecker .isSystemMessagePermittedToRegister("activity", - aApp.origin, + aApp.manifestURL, aManifest)) { msgmgr.registerPage("activity", launchPathURI, manifestURI); } @@ -961,7 +962,8 @@ this.DOMApplicationRegistry = { return; } - let localeManifest = new ManifestHelper(manifest, app.origin); + let localeManifest = + new ManifestHelper(manifest, app.origin, app.manifestURL); app.name = manifest.name; app.csp = manifest.csp || ""; @@ -1463,7 +1465,8 @@ this.DOMApplicationRegistry = { let results = yield this._readManifests([{ id: id }]); let jsonManifest = results[0].manifest; - let manifest = new ManifestHelper(jsonManifest, app.origin); + let manifest = + new ManifestHelper(jsonManifest, app.origin, app.manifestURL); if (manifest.appcache_path) { debug("appcache found"); @@ -1497,7 +1500,7 @@ this.DOMApplicationRegistry = { throw new Error("MISSING_UPDATE_MANIFEST"); } - let manifest = new ManifestHelper(json, app.manifestURL); + let manifest = new ManifestHelper(json, app.origin, app.manifestURL); let newApp = { manifestURL: aManifestURL, origin: app.origin, @@ -1808,7 +1811,8 @@ this.DOMApplicationRegistry = { } } }; - let helper = new ManifestHelper(manifest, aData.manifestURL); + let helper = + new ManifestHelper(manifest, aData.origin, aData.manifestURL); debug("onlyCheckAppCache - launch updateSvc.checkForUpdate for " + helper.fullAppcachePath()); updateSvc.checkForUpdate(Services.io.newURI(helper.fullAppcachePath(), null, null), @@ -1990,7 +1994,8 @@ this.DOMApplicationRegistry = { let manFile = OS.Path.join(dir, "staged-update.webapp"); yield this._writeFile(manFile, JSON.stringify(aNewManifest)); - let manifest = new ManifestHelper(aNewManifest, aApp.manifestURL); + let manifest = + new ManifestHelper(aNewManifest, aApp.origin, aApp.manifestURL); // A package is available: set downloadAvailable to fire the matching // event. aApp.downloadAvailable = true; @@ -2036,7 +2041,8 @@ this.DOMApplicationRegistry = { let manFile = OS.Path.join(dir, "manifest.webapp"); yield this._writeFile(manFile, JSON.stringify(aNewManifest)); - manifest = new ManifestHelper(aNewManifest, aApp.origin); + manifest = + new ManifestHelper(aNewManifest, aApp.origin, aApp.manifestURL); if (supportUseCurrentProfile()) { // Update the permissions for this app. @@ -2055,7 +2061,8 @@ this.DOMApplicationRegistry = { aApp.role = manifest.role || ""; aApp.updateTime = Date.now(); } else { - manifest = new ManifestHelper(aOldManifest, aApp.origin); + manifest = + new ManifestHelper(aOldManifest, aApp.origin, aApp.manifestURL); } // Update the registry. @@ -2564,7 +2571,8 @@ this.DOMApplicationRegistry = { yield this._writeManifestFile(id, aData.isPackage, jsonManifest); debug("app.origin: " + app.origin); - let manifest = new ManifestHelper(jsonManifest, app.origin); + let manifest = + new ManifestHelper(jsonManifest, app.origin, app.manifestURL); let appObject = this._cloneApp(aData, app, manifest, jsonManifest, id, localId); @@ -2618,7 +2626,7 @@ this.DOMApplicationRegistry = { // origin for install apps is meaningless here, since it's app:// and this // can't be used to resolve package paths. - manifest = new ManifestHelper(jsonManifest, app.manifestURL); + manifest = new ManifestHelper(jsonManifest, app.origin, app.manifestURL); this.queuedPackageDownload[app.manifestURL] = { manifest: manifest, diff --git a/dom/apps/tests/chrome.ini b/dom/apps/tests/chrome.ini index 90fef415c1b5..4acdb2d71a56 100644 --- a/dom/apps/tests/chrome.ini +++ b/dom/apps/tests/chrome.ini @@ -7,6 +7,7 @@ support-files = [test_apps_service.xul] [test_bug_945152.html] run-if = os == 'linux' +[test_manifest_helper.xul] [test_operator_app_install.js] [test_operator_app_install.xul] # bug 928262 diff --git a/dom/apps/tests/test_manifest_helper.xul b/dom/apps/tests/test_manifest_helper.xul new file mode 100644 index 000000000000..abe435181689 --- /dev/null +++ b/dom/apps/tests/test_manifest_helper.xul @@ -0,0 +1,52 @@ + + + + + + + + + + Mozilla Bug 1042881 + + + + + diff --git a/dom/messages/SystemMessagePermissionsChecker.jsm b/dom/messages/SystemMessagePermissionsChecker.jsm index 359ee3f5bfea..433c87598754 100644 --- a/dom/messages/SystemMessagePermissionsChecker.jsm +++ b/dom/messages/SystemMessagePermissionsChecker.jsm @@ -170,18 +170,20 @@ this.SystemMessagePermissionsChecker = { * app at start-up based on the permissions claimed in the app's manifest. * @param string aSysMsgName * The system messsage name. - * @param string aOrigin - * The app's origin. + * @param string aManifestURL + * The app's manifest URL. * @param object aManifest * The app's manifest. * @returns bool * Is permitted or not. **/ isSystemMessagePermittedToRegister: - function isSystemMessagePermittedToRegister(aSysMsgName, aOrigin, aManifest) { + function isSystemMessagePermittedToRegister(aSysMsgName, + aManifestURL, + aManifest) { debug("isSystemMessagePermittedToRegister(): " + "aSysMsgName: " + aSysMsgName + ", " + - "aOrigin: " + aOrigin + ", " + + "aManifestURL: " + aManifestURL + ", " + "aManifest: " + JSON.stringify(aManifest)); let permNames = this.getSystemMessagePermissions(aSysMsgName); @@ -207,20 +209,22 @@ this.SystemMessagePermissionsChecker = { break; } - let newManifest = new ManifestHelper(aManifest, aOrigin); + // It's ok here to not pass the origin to ManifestHelper since we only + // need the permission property and that doesn't depend on uri resolution. + let newManifest = new ManifestHelper(aManifest, aManifestURL, aManifestURL); for (let permName in permNames) { // The app doesn't claim valid permissions for this sytem message. if (!newManifest.permissions || !newManifest.permissions[permName]) { debug("'" + aSysMsgName + "' isn't permitted by '" + permName + "'. " + - "Please add the permission for app: '" + aOrigin + "'."); + "Please add the permission for app: '" + aManifestURL + "'."); return false; } let permValue = PermissionsTable[permName][appStatus]; if (permValue != Ci.nsIPermissionManager.PROMPT_ACTION && permValue != Ci.nsIPermissionManager.ALLOW_ACTION) { debug("'" + aSysMsgName + "' isn't permitted by '" + permName + "'. " + - "Please add the permission for app: '" + aOrigin + "'."); + "Please add the permission for app: '" + aManifestURL + "'."); return false; } diff --git a/mobile/android/chrome/content/WebappRT.js b/mobile/android/chrome/content/WebappRT.js index b9ad6c8b5ce0..4c41a319eb78 100644 --- a/mobile/android/chrome/content/WebappRT.js +++ b/mobile/android/chrome/content/WebappRT.js @@ -83,7 +83,7 @@ let WebappRT = { let apps = request.result; for (let i = 0; i < apps.length; i++) { let app = apps[i]; - let manifest = new ManifestHelper(app.manifest, app.origin); + let manifest = new ManifestHelper(app.manifest, app.origin, app.manifestURL); // if this is a path to the manifest, or the launch path, then we have a hit. if (app.manifestURL == aUrl || manifest.fullLaunchPath() == aUrl) { diff --git a/mobile/android/chrome/content/aboutApps.js b/mobile/android/chrome/content/aboutApps.js index a55e85717bd1..cceb27765034 100644 --- a/mobile/android/chrome/content/aboutApps.js +++ b/mobile/android/chrome/content/aboutApps.js @@ -105,7 +105,7 @@ function updateList() { function addApplication(aApp) { let list = document.getElementById("appgrid"); - let manifest = new ManifestHelper(aApp.manifest, aApp.origin); + let manifest = new ManifestHelper(aApp.manifest, aApp.origin, aApp.manifestURL); let container = document.createElement("div"); container.className = "app list-item"; diff --git a/mobile/android/modules/WebappManager.jsm b/mobile/android/modules/WebappManager.jsm index 9ba87a1cabcf..6ba50a44a14e 100644 --- a/mobile/android/modules/WebappManager.jsm +++ b/mobile/android/modules/WebappManager.jsm @@ -179,12 +179,13 @@ this.WebappManager = { DOMApplicationRegistry.registryReady.then(() => { DOMApplicationRegistry.confirmInstall(aData, file, (function(aApp, aManifest) { - this._postInstall(aData.profilePath, aManifest, aData.app.origin, aData.app.apkPackageName); + this._postInstall(aData.profilePath, aManifest, aData.app.origin, + aData.app.apkPackageName, aData.app.manifestURL); }).bind(this)); }); }, - _postInstall: function(aProfilePath, aNewManifest, aOrigin, aApkPackageName) { + _postInstall: function(aProfilePath, aNewManifest, aOrigin, aApkPackageName, aManifestURL) { // aOrigin may now point to the app: url that hosts this app. sendMessageToJava({ type: "Webapps:Postinstall", @@ -194,7 +195,7 @@ this.WebappManager = { let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile); file.initWithPath(aProfilePath); - let localeManifest = new ManifestHelper(aNewManifest, aOrigin); + let localeManifest = new ManifestHelper(aNewManifest, aOrigin, aManifestUrl); this.writeDefaultPrefs(file, localeManifest); }, @@ -333,7 +334,7 @@ this.WebappManager = { yield this._autoUpdatePackagedApp(aData, aOldApp); } - this._postInstall(aData.profilePath, aData.manifest, aOldApp.origin, aOldApp.apkPackageName); + this._postInstall(aData.profilePath, aData.manifest, aOldApp.origin, aOldApp.apkPackageName, aOldApp.manifestURL); }).bind(this)); }, _autoUpdatePackagedApp: Task.async(function*(aData, aOldApp) { diff --git a/toolkit/devtools/server/actors/webapps.js b/toolkit/devtools/server/actors/webapps.js index c4221cda95ac..9aa1c14f71af 100644 --- a/toolkit/devtools/server/actors/webapps.js +++ b/toolkit/devtools/server/actors/webapps.js @@ -283,7 +283,8 @@ WebappsActor.prototype = { // We can't have appcache for packaged apps. if (!aApp.origin.startsWith("app://")) { - reg.startOfflineCacheDownload(new ManifestHelper(manifest, aApp.origin)); + reg.startOfflineCacheDownload( + new ManifestHelper(manifest, aApp.origin, aApp.manifestURL)); } }); // Cleanup by removing the temporary directory. @@ -747,7 +748,7 @@ WebappsActor.prototype = { let deferred = promise.defer(); this._findManifestByURL(manifestURL).then(jsonManifest => { - let manifest = new ManifestHelper(jsonManifest, app.origin); + let manifest = new ManifestHelper(jsonManifest, app.origin, manifestURL); let iconURL = manifest.iconURLForSize(aRequest.size || 128); if (!iconURL) { deferred.resolve({ diff --git a/toolkit/webapps/NativeApp.jsm b/toolkit/webapps/NativeApp.jsm index 34616ca6c303..5aa9b6e017a1 100644 --- a/toolkit/webapps/NativeApp.jsm +++ b/toolkit/webapps/NativeApp.jsm @@ -57,7 +57,8 @@ function CommonNativeApp(aApp, aManifest, aCategories, aRegistryDir) { aApp.name = aManifest.name; this.uniqueName = WebappOSUtils.getUniqueName(aApp); - let localeManifest = new ManifestHelper(aManifest, aApp.origin); + let localeManifest = + new ManifestHelper(aManifest, aApp.origin, aApp.manifestURL); this.appLocalizedName = localeManifest.name; this.appNameAsFilename = stripStringForFilename(aApp.name); @@ -99,7 +100,7 @@ CommonNativeApp.prototype = { * */ _setData: function(aApp, aManifest) { - let manifest = new ManifestHelper(aManifest, aApp.origin); + let manifest = new ManifestHelper(aManifest, aApp.origin, aApp.manifestURL); let origin = Services.io.newURI(aApp.origin, null, null); this.iconURI = Services.io.newURI(manifest.biggestIconURL || DEFAULT_ICON_URL, diff --git a/webapprt/WebappManager.jsm b/webapprt/WebappManager.jsm index a301ba27acad..cdd3379204ac 100644 --- a/webapprt/WebappManager.jsm +++ b/webapprt/WebappManager.jsm @@ -47,7 +47,8 @@ this.WebappManager = { doInstall: function(data, window) { let jsonManifest = data.isPackage ? data.app.updateManifest : data.app.manifest; - let manifest = new ManifestHelper(jsonManifest, data.app.origin); + let manifest = + new ManifestHelper(jsonManifest, data.app.origin, data.app.manifestURL); let name = manifest.name; let bundle = Services.strings.createBundle("chrome://webapprt/locale/webapp.properties"); diff --git a/webapprt/WebappRT.jsm b/webapprt/WebappRT.jsm index f2854b004cde..d4c5f186f904 100644 --- a/webapprt/WebappRT.jsm +++ b/webapprt/WebappRT.jsm @@ -48,7 +48,8 @@ this.WebappRT = { get localeManifest() { return new ManifestHelper(this.config.app.manifest, - this.config.app.origin); + this.config.app.origin, + this.config.app.manifestURL); }, get appID() { From 57e17cdf44badb61cc7c67b76997eeb1890a05da Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 17:15:36 -0700 Subject: [PATCH 03/38] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/e247a559e1a6 Author: Zac Desc: Bug 1042032 - Disable test_gallery_view until dwong fixes the phones. --- 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 7dfcf1247157..28b943716b0b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "9f3b6b772b7b8b45634f9911c873f59a8036e9a9", + "revision": "e247a559e1a6915c4418ff08fa6a6dc6683e1d60", "repo_path": "/integration/gaia-central" } From 1ccbbfa7ab2df8d95f64d3a81cb47252f193f01b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 17:17:06 -0700 Subject: [PATCH 04/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 69bac69cccea..35baefec858d 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 63d55a5e9f91..d4315e978d06 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 6a6c1ff04c98..2af4a7def4c1 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 69bac69cccea..35baefec858d 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index fd0deead7616..9ab1ce195bd5 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 47e9aeaa17ac..24587e511988 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 a0fca0cfdfc1..a1dc9264f840 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 18bfb560d51b..f5e495750e33 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 387f39988578..7adb8e0be1c0 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 36f659d00e8f138db25f84b0e369a66eadebf918 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 17:55:32 -0700 Subject: [PATCH 05/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/2cb912d4cd59 Author: Michael Henretty Desc: Merge pull request #22376 from mikehenrty/bug-1044984-disabled Bug 1044984 - disabled intermittent worker_test.js, a=test-only ======== https://hg.mozilla.org/integration/gaia-central/rev/df0b200f0233 Author: Michael Henretty Desc: Bug 1044984 - disabled intermittent worker_test.js, a=test-only --- 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 28b943716b0b..bed9bd4820f0 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "e247a559e1a6915c4418ff08fa6a6dc6683e1d60", + "revision": "2cb912d4cd59510943274a5ba3224e8efb88359d", "repo_path": "/integration/gaia-central" } From 4c804dd48dcca2a45e648bc2965434c485f5bd29 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 18:01:19 -0700 Subject: [PATCH 06/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 35baefec858d..b0d9b4f3c9b5 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 d4315e978d06..c11ae70c381e 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 2af4a7def4c1..f31146241bef 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 35baefec858d..b0d9b4f3c9b5 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 9ab1ce195bd5..43792679ac8b 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 24587e511988..08c1ab0ff81c 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 a1dc9264f840..cedb832d69e7 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 f5e495750e33..8d81b809a0ca 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 7adb8e0be1c0..f4237f78860c 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 26689c5c690426f82d21a7f63534dca7b97b2a20 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 19:50:31 -0700 Subject: [PATCH 07/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/2bf6819ac166 Author: Zac Desc: Merge pull request #22380 from zacc/bug_1033975 Bug 1033975 - Resolve Python suite crash handling ======== https://hg.mozilla.org/integration/gaia-central/rev/81cc6b9c3558 Author: Zac Desc: Bug 1033975 - Resolve Python suite crash handling --- 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 bed9bd4820f0..884d39ca57b4 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "2cb912d4cd59510943274a5ba3224e8efb88359d", + "revision": "2bf6819ac166e72cccdd48ff6f39d6f0c0e7fc15", "repo_path": "/integration/gaia-central" } From 8c4fe9c038df28e834f48b6b14c187589ec4a9de Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 19:51:55 -0700 Subject: [PATCH 08/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index b0d9b4f3c9b5..6c28beb5a2e7 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 c11ae70c381e..06bf18b9a453 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 f31146241bef..61b177273b1d 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 b0d9b4f3c9b5..6c28beb5a2e7 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 43792679ac8b..ff3d414a2055 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 08c1ab0ff81c..2ac4f351ed3a 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 cedb832d69e7..bddf588d6fa3 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 8d81b809a0ca..2e3f39261f63 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 f4237f78860c..1debaebe277d 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 1c8e484aef00d509eecadb612bfb0fc57420c550 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 20:20:35 -0700 Subject: [PATCH 09/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d15738b957db Author: Greg Weng Desc: Merge pull request #22346 from snowmantw/issue1041889 Bug 1041889 - [Browser] After the lockscreen orientation change does not... ======== https://hg.mozilla.org/integration/gaia-central/rev/ad049380e791 Author: Greg Weng Desc: Bug 1041889 - [Browser] After the lockscreen orientation change does not occur --- 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 884d39ca57b4..7ced622fe8e6 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "2bf6819ac166e72cccdd48ff6f39d6f0c0e7fc15", + "revision": "d15738b957db6f7e43164e89e19e79ed5901d750", "repo_path": "/integration/gaia-central" } From 8e7e6a760661de7131d48af636d53580e91db1f7 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 20:26:28 -0700 Subject: [PATCH 10/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 6c28beb5a2e7..b9abcae2fd65 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 06bf18b9a453..0fc9eeef44ff 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 61b177273b1d..62763ca1d6f7 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 6c28beb5a2e7..b9abcae2fd65 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index ff3d414a2055..c36688a5f27d 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 2ac4f351ed3a..452577a43ee1 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 bddf588d6fa3..c2c02a5f9c5d 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 2e3f39261f63..0c70760ec30a 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 1debaebe277d..c2a5a4feac07 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From d443a3a9f246bdef3be2f898f1bd01dbabbba4ac Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 20:45:36 -0700 Subject: [PATCH 11/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d5c180524a00 Author: Arthur Chen Desc: Merge pull request #22333 from crh0716/1044166 Bug 1044166 - Should set the wallpaper src when displaying the panel r=eragonj ======== https://hg.mozilla.org/integration/gaia-central/rev/b5f94e8cd240 Author: Arthur Chen Desc: Bug 1044166 - Should set the wallpaper src when displaying the panel --- 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 7ced622fe8e6..ab04e15ed3dd 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d15738b957db6f7e43164e89e19e79ed5901d750", + "revision": "d5c180524a001a9cafd769233c18c87c48285c9d", "repo_path": "/integration/gaia-central" } From b9f9213b6d07d16e7fefd752bfcefa15e3c5b90f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 20:47:06 -0700 Subject: [PATCH 12/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index b9abcae2fd65..5a758115d9cb 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 0fc9eeef44ff..714dcb3785d8 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 62763ca1d6f7..ea2aea377ea3 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 b9abcae2fd65..5a758115d9cb 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index c36688a5f27d..07c3b0c26370 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 452577a43ee1..18bd3325c2ec 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 c2c02a5f9c5d..cb5841a6056f 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 0c70760ec30a..f1bc8ede39b0 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 c2a5a4feac07..8e5f9d1f8e04 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 8b0b298d5ba9474b9624ac713555cec9a48c720c Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Thu, 24 Jul 2014 12:16:02 +0800 Subject: [PATCH 13/38] Bug 1043186 - Part 1: Add a nsINfcPeerEventListener. r=dimi --- dom/nfc/nsNfc.js | 63 ++++++++++++++--------- dom/nfc/tests/marionette/test_nfc_peer.js | 3 +- dom/system/gonk/NfcContentHelper.js | 37 ++++++------- dom/system/gonk/nsINfcContentHelper.idl | 36 +++++++------ 4 files changed, 80 insertions(+), 59 deletions(-) diff --git a/dom/nfc/nsNfc.js b/dom/nfc/nsNfc.js index 2e39fabd9972..a35c12d672e8 100644 --- a/dom/nfc/nsNfc.js +++ b/dom/nfc/nsNfc.js @@ -136,6 +136,8 @@ function mozNfc() { } catch(e) { debug("No NFC support.") } + + this._nfcContentHelper.registerPeerEventListener(this); } mozNfc.prototype = { _nfcContentHelper: null, @@ -234,19 +236,47 @@ mozNfc.prototype = { }, registerTarget: function registerTarget(event) { - let self = this; let appId = this._window.document.nodePrincipal.appId; - this._nfcContentHelper.registerTargetForPeerEvent(this._window, appId, - event, function(evt, sessionToken) { - self.session = sessionToken; - self.firePeerEvent(evt, sessionToken); - }); + this._nfcContentHelper.registerTargetForPeerEvent(this._window, appId, event); }, unregisterTarget: function unregisterTarget(event) { let appId = this._window.document.nodePrincipal.appId; - this._nfcContentHelper.unregisterTargetForPeerEvent(this._window, - appId, event); + this._nfcContentHelper.unregisterTargetForPeerEvent(this._window, appId, event); + }, + + notifyPeerReady: function notifyPeerReady(sessionToken) { + if (this.hasDeadWrapper()) { + dump("this._window or this.__DOM_IMPL__ is a dead wrapper."); + return; + } + + this.session = sessionToken; + + debug("fire onpeerready sessionToken : " + sessionToken); + let detail = { + "detail":sessionToken + }; + let event = new this._window.CustomEvent("peerready", this._wrap(detail)); + this.__DOM_IMPL__.dispatchEvent(event); + }, + + notifyPeerLost: function notifyPeerLost(sessionToken) { + if (this.hasDeadWrapper()) { + dump("this._window or this.__DOM_IMPL__ is a dead wrapper."); + return; + } + + if (sessionToken != this.session) { + dump("Unpaired session for notifyPeerLost." + sessionToken); + return; + } + + this.session = null; + + debug("fire onpeerlost"); + let event = new this._window.Event("peerlost"); + this.__DOM_IMPL__.dispatchEvent(event); }, getEventType: function getEventType(evt) { @@ -268,24 +298,11 @@ mozNfc.prototype = { return Cu.isDeadWrapper(this._window) || Cu.isDeadWrapper(this.__DOM_IMPL__); }, - firePeerEvent: function firePeerEvent(evt, sessionToken) { - if (this.hasDeadWrapper()) { - dump("this._window or this.__DOM_IMPL__ is a dead wrapper."); - return; - } - - let peerEvent = (NFC_PEER_EVENT_READY === evt) ? "peerready" : "peerlost"; - let detail = { - "detail":sessionToken - }; - let event = new this._window.CustomEvent(peerEvent, this._wrap(detail)); - this.__DOM_IMPL__.dispatchEvent(event); - }, - classID: Components.ID("{6ff2b290-2573-11e3-8224-0800200c9a66}"), contractID: "@mozilla.org/navigatorNfc;1", QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, - Ci.nsIDOMGlobalPropertyInitializer]), + Ci.nsIDOMGlobalPropertyInitializer, + Ci.nsINfcPeerEventListener]), }; this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MozNFCTag, MozNFCPeer, mozNfc]); diff --git a/dom/nfc/tests/marionette/test_nfc_peer.js b/dom/nfc/tests/marionette/test_nfc_peer.js index 1cb57b22b56f..ce0f30520378 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer.js +++ b/dom/nfc/tests/marionette/test_nfc_peer.js @@ -17,8 +17,9 @@ function peerReadyCb(evt) { NCI.deactivate(); } -function peerLostCb() { +function peerLostCb(evt) { log("peerLostCb called"); + ok(evt.detail === undefined, "evt.detail should be undefined"); ok(true); nfc.onpeerlost = null; toggleNFC(false).then(runNextTest); diff --git a/dom/system/gonk/NfcContentHelper.js b/dom/system/gonk/NfcContentHelper.js index d55839be5928..03fb8a8beb54 100644 --- a/dom/system/gonk/NfcContentHelper.js +++ b/dom/system/gonk/NfcContentHelper.js @@ -80,10 +80,6 @@ function NfcContentHelper() { Services.obs.addObserver(this, "xpcom-shutdown", false); this._requestMap = []; - - // Maintains an array of PeerEvent related callbacks, mainly - // one for 'peerReady' and another for 'peerLost'. - this.peerEventsCallbackMap = {}; } NfcContentHelper.prototype = { @@ -100,7 +96,7 @@ NfcContentHelper.prototype = { }), _requestMap: null, - peerEventsCallbackMap: null, + peerEventListener: null, encodeNDEFRecords: function encodeNDEFRecords(records) { let encodedRecords = []; @@ -261,29 +257,29 @@ NfcContentHelper.prototype = { }); }, - registerTargetForPeerEvent: function registerTargetForPeerEvent(window, - appId, event, callback) { + registerPeerEventListener: function registerPeerEventListener(listener) { + this.peerEventListener = listener; + }, + + registerTargetForPeerEvent: + function registerTargetForPeerEvent(window, appId, event) { if (window == null) { throw Components.Exception("Can't get window object", Cr.NS_ERROR_UNEXPECTED); } - this.peerEventsCallbackMap[event] = callback; + cpmm.sendAsyncMessage("NFC:RegisterPeerTarget", { appId: appId, event: event }); }, - unregisterTargetForPeerEvent: function unregisterTargetForPeerEvent(window, - appId, event) { + unregisterTargetForPeerEvent: + function unregisterTargetForPeerEvent(window, appId, event) { if (window == null) { throw Components.Exception("Can't get window object", Cr.NS_ERROR_UNEXPECTED); } - let callback = this.peerEventsCallbackMap[event]; - if (callback != null) { - delete this.peerEventsCallbackMap[event]; - } cpmm.sendAsyncMessage("NFC:UnregisterPeerTarget", { appId: appId, @@ -427,12 +423,13 @@ NfcContentHelper.prototype = { } break; case "NFC:PeerEvent": - let callback = this.peerEventsCallbackMap[result.event]; - if (callback) { - callback.peerNotification(result.event, result.sessionToken); - } else { - debug("PeerEvent: No valid callback registered for the event " + - result.event); + switch (result.event) { + case NFC.NFC_PEER_EVENT_READY: + this.peerEventListener.notifyPeerReady(result.sessionToken); + break; + case NFC.NFC_PEER_EVENT_LOST: + this.peerEventListener.notifyPeerLost(result.sessionToken); + break; } break; } diff --git a/dom/system/gonk/nsINfcContentHelper.idl b/dom/system/gonk/nsINfcContentHelper.idl index a87d62d09d1c..45a3384226e5 100644 --- a/dom/system/gonk/nsINfcContentHelper.idl +++ b/dom/system/gonk/nsINfcContentHelper.idl @@ -7,24 +7,27 @@ interface nsIVariant; -[scriptable, function, uuid(26673d1a-4af4-470a-ba96-f1f54b1f2052)] -interface nsINfcPeerCallback : nsISupports +[scriptable, uuid(57fc2998-1058-4fd5-8dd9-0e303218d5fd)] +interface nsINfcPeerEventListener : nsISupports { /** - * Callback function used to notify NFC peer events. - * - * @param event - * An event indicating 'PeerReady' or 'PeerLost' - * One of NFC_EVENT_PEER_XXXX + * Callback function used to notify peerready. * * @param sessionToken * SessionToken received from Chrome process */ - void peerNotification(in unsigned long event, - in DOMString sessionToken); + void notifyPeerReady(in DOMString sessionToken); + + /** + * Callback function used to notify peerlost. + * + * @param sessionToken + * SessionToken received from Chrome process + */ + void notifyPeerLost(in DOMString sessionToken); }; -[scriptable, uuid(26e8123f-ba00-4708-ac77-d1902457168c)] +[scriptable, uuid(21559f98-526c-44c8-94fb-2095a112c47c)] interface nsINfcContentHelper : nsISupports { const long NFC_EVENT_PEER_READY = 0x01; @@ -61,6 +64,13 @@ interface nsINfcContentHelper : nsISupports in jsval blob, in DOMString sessionToken); + /** + * Register the peer event listener. + * + * @param listener An instance of the nsINfcPeerEventListener. + */ + void registerPeerEventListener(in nsINfcPeerEventListener listener); + /** * Register the given application id with Chrome process * @@ -72,14 +82,10 @@ interface nsINfcContentHelper : nsISupports * * @param event * Event to be registered. Either NFC_EVENT_PEER_READY or NFC_EVENT_PEER_LOST - * - * @param callback - * Callback that is used to notify upper layers whenever PeerEvents happen. */ void registerTargetForPeerEvent(in nsIDOMWindow window, in unsigned long appId, - in octet event, - in nsINfcPeerCallback callback); + in octet event); /** * Unregister the given application id with Chrome process * From b5aed2d79fb7e35265429db2bf0dc22038280d90 Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Thu, 24 Jul 2014 18:11:42 +0800 Subject: [PATCH 14/38] Bug 1043186 - Part 2: onpeerlost should be fired to correct target. r=dimi --- dom/nfc/nsNfc.js | 20 ++--- dom/nfc/tests/marionette/test_nfc_peer.js | 22 ++++- dom/system/gonk/Nfc.js | 100 +++++++++------------- dom/system/gonk/NfcContentHelper.js | 16 +--- dom/system/gonk/nsINfcContentHelper.idl | 20 ++--- 5 files changed, 78 insertions(+), 100 deletions(-) diff --git a/dom/nfc/nsNfc.js b/dom/nfc/nsNfc.js index a35c12d672e8..616b1d980076 100644 --- a/dom/nfc/nsNfc.js +++ b/dom/nfc/nsNfc.js @@ -223,26 +223,22 @@ mozNfc.prototype = { eventListenerWasAdded: function(evt) { let eventType = this.getEventType(evt); - if (eventType == -1) + if (eventType != NFC_PEER_EVENT_READY) { return; - this.registerTarget(eventType); + } + + let appId = this._window.document.nodePrincipal.appId; + this._nfcContentHelper.registerTargetForPeerReady(this._window, appId); }, eventListenerWasRemoved: function(evt) { let eventType = this.getEventType(evt); - if (eventType == -1) + if (eventType != NFC_PEER_EVENT_READY) { return; - this.unregisterTarget(eventType); - }, + } - registerTarget: function registerTarget(event) { let appId = this._window.document.nodePrincipal.appId; - this._nfcContentHelper.registerTargetForPeerEvent(this._window, appId, event); - }, - - unregisterTarget: function unregisterTarget(event) { - let appId = this._window.document.nodePrincipal.appId; - this._nfcContentHelper.unregisterTargetForPeerEvent(this._window, appId, event); + this._nfcContentHelper.unregisterTargetForPeerReady(this._window, appId); }, notifyPeerReady: function notifyPeerReady(sessionToken) { diff --git a/dom/nfc/tests/marionette/test_nfc_peer.js b/dom/nfc/tests/marionette/test_nfc_peer.js index ce0f30520378..2eb1fcdbaea9 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer.js +++ b/dom/nfc/tests/marionette/test_nfc_peer.js @@ -12,8 +12,6 @@ function peerReadyCb(evt) { let peer = nfc.getNFCPeer(evt.detail); ok(peer instanceof MozNFCPeer, "Should get a NFCPeer object."); - // reset callback. - nfc.onpeerready = null; NCI.deactivate(); } @@ -21,6 +19,9 @@ function peerLostCb(evt) { log("peerLostCb called"); ok(evt.detail === undefined, "evt.detail should be undefined"); ok(true); + + // reset callback. + nfc.onpeerready = null; nfc.onpeerlost = null; toggleNFC(false).then(runNextTest); } @@ -94,10 +95,25 @@ function testCheckNfcPeerObjForInvalidToken() { toggleNFC(false).then(runNextTest); } +function testPeerLostShouldNotBeCalled() { + nfc.onpeerlost = function () { + ok(false, "onpeerlost shouldn't be called"); + }; + + toggleNFC(true) + .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) + .then(NCI.deactivate) + .then(() => toggleNFC(false)); + + nfc.onpeerlost = null; + runNextTest(); +} + let tests = [ testPeerReady, testCheckP2PRegFailure, - testCheckNfcPeerObjForInvalidToken + testCheckNfcPeerObjForInvalidToken, + testPeerLostShouldNotBeCalled ]; SpecialPowers.pushPermissions( diff --git a/dom/system/gonk/Nfc.js b/dom/system/gonk/Nfc.js index 5a6ab9ad0053..edd0cdf183ab 100644 --- a/dom/system/gonk/Nfc.js +++ b/dom/system/gonk/Nfc.js @@ -62,8 +62,8 @@ const NFC_IPC_WRITE_PERM_MSG_NAMES = [ "NFC:WriteNDEF", "NFC:MakeReadOnlyNDEF", "NFC:SendFile", - "NFC:RegisterPeerTarget", - "NFC:UnregisterPeerTarget" + "NFC:RegisterPeerReadyTarget", + "NFC:UnregisterPeerReadyTarget" ]; const NFC_IPC_MANAGER_PERM_MSG_NAMES = [ @@ -224,52 +224,28 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { } }, - registerPeerTarget: function registerPeerTarget(msg) { + registerPeerReadyTarget: function registerPeerReadyTarget(msg) { let appInfo = msg.json; - // Sanity check on PeerEvent - if (!this.isValidPeerEvent(appInfo.event)) { - return; - } let targets = this.peerTargetsMap; let targetInfo = targets[appInfo.appId]; // If the application Id is already registered if (targetInfo) { - // If the event is not registered - if (targetInfo.event !== appInfo.event) { - // Update the event field ONLY - targetInfo.event |= appInfo.event; - } - // Otherwise event is already registered, return! return; } - // Target not registered yet! Add to the target map - // Registered targetInfo target consists of 2 fields (values) - // target : Target to notify the right content for peer notifications - // event : NFC_PEER_EVENT_READY (0x01) Or NFC_PEER_EVENT_LOST (0x02) + // Target not registered yet! Add to the target map let newTargetInfo = { target : msg.target, - event : appInfo.event }; + isPeerReadyCalled: false }; targets[appInfo.appId] = newTargetInfo; }, - unregisterPeerTarget: function unregisterPeerTarget(msg) { + unregisterPeerReadyTarget: function unregisterPeerReadyTarget(msg) { let appInfo = msg.json; - // Sanity check on PeerEvent - if (!this.isValidPeerEvent(appInfo.event)) { - return; - } let targets = this.peerTargetsMap; let targetInfo = targets[appInfo.appId]; if (targetInfo) { - // Application Id registered and the event exactly matches. - if (targetInfo.event === appInfo.event) { - // Remove the target from the list of registered targets - delete targets[appInfo.appId] - } - else { - // Otherwise, update the event field ONLY, by removing the event flag - targetInfo.event &= ~appInfo.event; - } + // Remove the target from the list of registered targets + delete targets[appInfo.appId] } }, @@ -284,39 +260,29 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { }); }, - isRegisteredP2PTarget: function isRegisteredP2PTarget(appId, event) { + isPeerReadyTarget: function isPeerReadyTarget(appId) { let targetInfo = this.peerTargetsMap[appId]; - // Check if it is a registered target for the 'event' - return ((targetInfo != null) && ((targetInfo.event & event) !== 0)); + return (targetInfo != null); + }, + + isPeerReadyCalled: function isPeerReadyCalled(appId) { + let targetInfo = this.peerTargetsMap[appId]; + return targetInfo.IsPeerReadyCalled; }, notifyPeerEvent: function notifyPeerEvent(appId, event) { let targetInfo = this.peerTargetsMap[appId]; - // Check if the application id is a registeredP2PTarget - if (this.isRegisteredP2PTarget(appId, event)) { - targetInfo.target.sendAsyncMessage("NFC:PeerEvent", { - event: event, - sessionToken: this.nfc.sessionTokenMap[this.nfc._currentSessionId] - }); - return; - } - debug("Application ID : " + appId + " is not a registered target" + - "for the event " + event + " notification"); - }, - - isValidPeerEvent: function isValidPeerEvent(event) { - // Valid values : 0x01, 0x02 Or 0x03 - return ((event === NFC.NFC_PEER_EVENT_READY) || - (event === NFC.NFC_PEER_EVENT_LOST) || - (event === (NFC.NFC_PEER_EVENT_READY | NFC.NFC_PEER_EVENT_LOST))); + targetInfo.target.sendAsyncMessage("NFC:PeerEvent", { + event: event, + sessionToken: this.nfc.sessionTokenMap[this.nfc._currentSessionId] + }); }, checkP2PRegistration: function checkP2PRegistration(msg) { // Check if the session and application id yeild a valid registered // target. It should have registered for NFC_PEER_EVENT_READY let isValid = !!this.nfc.sessionTokenMap[this.nfc._currentSessionId] && - this.isRegisteredP2PTarget(msg.json.appId, - NFC.NFC_PEER_EVENT_READY); + this.isPeerReadyTarget(msg.json.appId); // Remember the current AppId if registered. this.currentPeerAppId = (isValid) ? msg.json.appId : null; @@ -378,17 +344,24 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () { debug("Registering target for this SessionToken : " + this.nfc.sessionTokenMap[this.nfc._currentSessionId]); return NFC.NFC_SUCCESS; - case "NFC:RegisterPeerTarget": - this.registerPeerTarget(msg); + case "NFC:RegisterPeerReadyTarget": + this.registerPeerReadyTarget(msg); return null; - case "NFC:UnregisterPeerTarget": - this.unregisterPeerTarget(msg); + case "NFC:UnregisterPeerReadyTarget": + this.unregisterPeerReadyTarget(msg); return null; case "NFC:CheckP2PRegistration": this.checkP2PRegistration(msg); return null; case "NFC:NotifyUserAcceptedP2P": // Notify the 'NFC_PEER_EVENT_READY' since user has acknowledged + if (!this.isPeerReadyTarget(msg.json.appId)) { + debug("Application ID : " + appId + " is not a registered PeerReadytarget"); + return null; + } + + let targetInfo = this.peerTargetsMap[msg.json.appId]; + targetInfo.IsPeerReadyCalled = true; this.notifyPeerEvent(msg.json.appId, NFC.NFC_PEER_EVENT_READY); return null; case "NFC:NotifySendFileStatus": @@ -530,8 +503,15 @@ Nfc.prototype = { delete message.sessionId; gSystemMessenger.broadcastMessage("nfc-manager-tech-lost", message); - // Notify 'PeerLost' to appropriate registered target, if any - gMessageManager.notifyPeerEvent(gMessageManager.currentPeerAppId, NFC.NFC_PEER_EVENT_LOST); + + let appId = gMessageManager.currentPeerAppId; + + // For peerlost, the message is delievered to the target which + // registered onpeerready and onpeerready has been called before. + if (gMessageManager.isPeerReadyTarget(appId) && gMessageManager.isPeerReadyCalled(appId)) { + gMessageManager.notifyPeerEvent(appId, NFC.NFC_PEER_EVENT_LOST); + } + delete this.sessionTokenMap[this._currentSessionId]; this._currentSessionId = null; this.currentPeerAppId = null; diff --git a/dom/system/gonk/NfcContentHelper.js b/dom/system/gonk/NfcContentHelper.js index 03fb8a8beb54..f1c883bd0cf7 100644 --- a/dom/system/gonk/NfcContentHelper.js +++ b/dom/system/gonk/NfcContentHelper.js @@ -261,30 +261,22 @@ NfcContentHelper.prototype = { this.peerEventListener = listener; }, - registerTargetForPeerEvent: - function registerTargetForPeerEvent(window, appId, event) { + registerTargetForPeerReady: function registerTargetForPeerReady(window, appId) { if (window == null) { throw Components.Exception("Can't get window object", Cr.NS_ERROR_UNEXPECTED); } - cpmm.sendAsyncMessage("NFC:RegisterPeerTarget", { - appId: appId, - event: event - }); + cpmm.sendAsyncMessage("NFC:RegisterPeerReadyTarget", { appId: appId }); }, - unregisterTargetForPeerEvent: - function unregisterTargetForPeerEvent(window, appId, event) { + unregisterTargetForPeerReady: function unregisterTargetForPeerReady(window, appId) { if (window == null) { throw Components.Exception("Can't get window object", Cr.NS_ERROR_UNEXPECTED); } - cpmm.sendAsyncMessage("NFC:UnregisterPeerTarget", { - appId: appId, - event: event - }); + cpmm.sendAsyncMessage("NFC:UnregisterPeerReadyTarget", { appId: appId }); }, checkP2PRegistration: function checkP2PRegistration(window, appId) { diff --git a/dom/system/gonk/nsINfcContentHelper.idl b/dom/system/gonk/nsINfcContentHelper.idl index 45a3384226e5..b3cabe3991ef 100644 --- a/dom/system/gonk/nsINfcContentHelper.idl +++ b/dom/system/gonk/nsINfcContentHelper.idl @@ -27,7 +27,7 @@ interface nsINfcPeerEventListener : nsISupports void notifyPeerLost(in DOMString sessionToken); }; -[scriptable, uuid(21559f98-526c-44c8-94fb-2095a112c47c)] +[scriptable, uuid(5bea28d3-67ee-4916-8c8e-4f35e3666e61)] interface nsINfcContentHelper : nsISupports { const long NFC_EVENT_PEER_READY = 0x01; @@ -79,13 +79,10 @@ interface nsINfcContentHelper : nsISupports * * @param appId * Application ID to be registered - * - * @param event - * Event to be registered. Either NFC_EVENT_PEER_READY or NFC_EVENT_PEER_LOST */ - void registerTargetForPeerEvent(in nsIDOMWindow window, - in unsigned long appId, - in octet event); + void registerTargetForPeerReady(in nsIDOMWindow window, + in unsigned long appId); + /** * Unregister the given application id with Chrome process * @@ -94,13 +91,10 @@ interface nsINfcContentHelper : nsISupports * * @param appId * Application ID to be registered - * - * @param event - * Event to be unregistered. Either NFC_EVENT_PEER_READY or NFC_EVENT_PEER_LOST */ - void unregisterTargetForPeerEvent(in nsIDOMWindow window, - in unsigned long appId, - in octet event); + void unregisterTargetForPeerReady(in nsIDOMWindow window, + in unsigned long appId); + /** * Checks if the given application's id is a registered peer target (with the Chrome process) * From c9a2372387f11a15221b97876fd37a761147674c Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Fri, 25 Jul 2014 18:03:37 +0800 Subject: [PATCH 15/38] Bug 1043186 - Part 3: return cached NFCPeer if session matches. --- dom/nfc/nsNfc.js | 24 +++++++++++++++++------ dom/nfc/tests/marionette/test_nfc_peer.js | 2 ++ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/dom/nfc/nsNfc.js b/dom/nfc/nsNfc.js index 616b1d980076..03b09c489ab0 100644 --- a/dom/nfc/nsNfc.js +++ b/dom/nfc/nsNfc.js @@ -142,6 +142,8 @@ function mozNfc() { mozNfc.prototype = { _nfcContentHelper: null, _window: null, + nfcObject: null, + _wrap: function _wrap(obj) { return Cu.cloneInto(obj, this._window); }, @@ -194,13 +196,19 @@ mozNfc.prototype = { }, getNFCPeer: function getNFCPeer(sessionToken) { - let obj = new MozNFCPeer(); - obj.initialize(this._window, sessionToken); - if (this._nfcContentHelper.setSessionToken(sessionToken)) { - return this._window.MozNFCPeer._create(this._window, obj); + if (!sessionToken || !this._nfcContentHelper.setSessionToken(sessionToken)) { + throw new Error("Unable to create NFCPeer object, Reason: Bad SessionToken " + + sessionToken); } - throw new Error("Unable to create NFCPeer object, Reason: Bad SessionToken " + - sessionToken); + + if (!this.nfcObject) { + let obj = new MozNFCPeer(); + obj.initialize(this._window, sessionToken); + this.nfcObject = obj; + this.nfcObject.contentObject = this._window.MozNFCPeer._create(this._window, obj); + } + + return this.nfcObject.contentObject; }, // get/set onpeerready @@ -268,6 +276,10 @@ mozNfc.prototype = { return; } + if (this.nfcObject && (this.nfcObject.session == sessionToken)) { + this.nfcObject = null; + } + this.session = null; debug("fire onpeerlost"); diff --git a/dom/nfc/tests/marionette/test_nfc_peer.js b/dom/nfc/tests/marionette/test_nfc_peer.js index 2eb1fcdbaea9..f13ff70166ab 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer.js +++ b/dom/nfc/tests/marionette/test_nfc_peer.js @@ -10,6 +10,8 @@ let INCORRECT_MANIFEST_URL = "app://xyz.gaiamobile.org/manifest.webapp"; function peerReadyCb(evt) { log("peerReadyCb called"); let peer = nfc.getNFCPeer(evt.detail); + let peer1 = nfc.getNFCPeer(evt.detail); + ok(peer == peer1, "Should get the same NFCPeer object."); ok(peer instanceof MozNFCPeer, "Should get a NFCPeer object."); NCI.deactivate(); From be0bc676debdd4f8bb7d5fca5762ff3debcf2f14 Mon Sep 17 00:00:00 2001 From: Yoshi Huang Date: Tue, 29 Jul 2014 11:36:58 +0800 Subject: [PATCH 16/38] Bug 1043186 - Part 4: Add throw in MozNFCPeer. r=smaug, dimi --- dom/nfc/nsNfc.js | 14 ++++++++ dom/nfc/tests/marionette/test_nfc_peer.js | 43 ++++++++++++++++++++++- dom/webidl/MozNFCPeer.webidl | 2 ++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/dom/nfc/nsNfc.js b/dom/nfc/nsNfc.js index 03b09c489ab0..3cc1c08d88bf 100644 --- a/dom/nfc/nsNfc.js +++ b/dom/nfc/nsNfc.js @@ -98,6 +98,7 @@ function MozNFCPeer() { MozNFCPeer.prototype = { _nfcContentHelper: null, _window: null, + _isLost: false, initialize: function(aWindow, aSessionToken) { this._window = aWindow; @@ -106,11 +107,19 @@ MozNFCPeer.prototype = { // NFCPeer interface: sendNDEF: function sendNDEF(records) { + if (this._isLost) { + throw new this._window.DOMError("InvalidStateError", "NFCPeer object is invalid"); + } + // Just forward sendNDEF to writeNDEF return this._nfcContentHelper.writeNDEF(this._window, records, this.session); }, sendFile: function sendFile(blob) { + if (this._isLost) { + throw new this._window.DOMError("InvalidStateError", "NFCPeer object is invalid"); + } + let data = { "blob": blob }; @@ -119,6 +128,10 @@ MozNFCPeer.prototype = { this.session); }, + invalidate: function invalidate() { + this._isLost = true; + }, + classID: Components.ID("{c1b2bcf0-35eb-11e3-aa6e-0800200c9a66}"), contractID: "@mozilla.org/nfc/NFCPeer;1", QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, @@ -277,6 +290,7 @@ mozNfc.prototype = { } if (this.nfcObject && (this.nfcObject.session == sessionToken)) { + this.nfcObject.invalidate(); this.nfcObject = null; } diff --git a/dom/nfc/tests/marionette/test_nfc_peer.js b/dom/nfc/tests/marionette/test_nfc_peer.js index f13ff70166ab..62ecf5ccb109 100644 --- a/dom/nfc/tests/marionette/test_nfc_peer.js +++ b/dom/nfc/tests/marionette/test_nfc_peer.js @@ -111,11 +111,52 @@ function testPeerLostShouldNotBeCalled() { runNextTest(); } +function testPeerShouldThrow() { + let peer; + let tnf = NDEF.TNF_WELL_KNOWN; + let type = new Uint8Array(NfcUtils.fromUTF8("U")); + let id = new Uint8Array(NfcUtils.fromUTF8("")); + let payload = new Uint8Array(NfcUtils.fromUTF8(url)); + let ndef = [new MozNDEFRecord(tnf, type, id, payload)]; + + nfc.onpeerready = function (evt) { + peer = nfc.getNFCPeer(evt.detail); + }; + + let request = nfc.checkP2PRegistration(MANIFEST_URL); + request.onsuccess = function (evt) { + is(request.result, true, "check for P2P registration result"); + nfc.notifyUserAcceptedP2P(MANIFEST_URL); + } + + toggleNFC(true) + .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) + .then(NCI.deactivate); + + try { + peer.sendNDEF(ndef); + ok(false, "sendNDEF should throw error"); + } catch (e) { + ok(true, "Exception expected"); + } + + try { + peer.sendFile(new Blob()); + ok(false, "sendfile should throw error"); + } catch (e) { + ok(true, "Exception expected"); + } + + nfc.onpeerready = null; + toggleNFC(false).then(runNextTest); +} + let tests = [ testPeerReady, testCheckP2PRegFailure, testCheckNfcPeerObjForInvalidToken, - testPeerLostShouldNotBeCalled + testPeerLostShouldNotBeCalled, + testPeerShouldThrow ]; SpecialPowers.pushPermissions( diff --git a/dom/webidl/MozNFCPeer.webidl b/dom/webidl/MozNFCPeer.webidl index bd7a22ae6a19..d9a52f163d9c 100644 --- a/dom/webidl/MozNFCPeer.webidl +++ b/dom/webidl/MozNFCPeer.webidl @@ -10,7 +10,9 @@ [JSImplementation="@mozilla.org/nfc/NFCPeer;1"] interface MozNFCPeer { + [Throws] DOMRequest sendNDEF(sequence records); + [Throws] DOMRequest sendFile(Blob blob); }; From f5c8104eac2b48fbeb1847ee76b57ec583da9e07 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 31 Jul 2014 17:00:46 -0400 Subject: [PATCH 17/38] Bug 1045118 follow-up - add d3.js and frame-script-utils.js to EXTRA_JS_MODULES; r=me a=needthisoncentral --- browser/devtools/shared/moz.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/browser/devtools/shared/moz.build b/browser/devtools/shared/moz.build index a7f75283255d..a0df9de87921 100644 --- a/browser/devtools/shared/moz.build +++ b/browser/devtools/shared/moz.build @@ -31,6 +31,8 @@ EXTRA_JS_MODULES.devtools += [ EXTRA_JS_MODULES.devtools.shared += [ 'autocomplete-popup.js', + 'd3.js', + 'frame-script-utils.js', 'inplace-editor.js', 'observable-object.js', 'telemetry.js', From c60b44a7b137ed1ebb3444efebb089d755424d54 Mon Sep 17 00:00:00 2001 From: Wes Kocher Date: Thu, 31 Jul 2014 15:04:49 -0700 Subject: [PATCH 18/38] Backed out changeset f73cd738c1fe (bug 1038854) a=backout --- mozglue/build/Nuwa.cpp | 48 +++++++++--------------------------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/mozglue/build/Nuwa.cpp b/mozglue/build/Nuwa.cpp index 49c6a4f7515a..a5996868a694 100644 --- a/mozglue/build/Nuwa.cpp +++ b/mozglue/build/Nuwa.cpp @@ -140,21 +140,7 @@ struct thread_info : public mozilla::LinkedListElement { TLSInfoList tlsInfo; - /** - * We must ensure that the recreated thread has entered pthread_cond_wait() or - * similar functions before proceeding to recreate the next one. Otherwise, if - * the next thread depends on the same mutex, it may be used in an incorrect - * state. To do this, the main thread must unconditionally acquire the mutex. - * The mutex is unconditionally released when the recreated thread enters - * pthread_cond_wait(). The recreated thread may have locked the mutex itself - * (if the pthread_mutex_trylock succeeded) or another thread may have already - * held the lock. If the recreated thread did lock the mutex we must balance - * that with another unlock on the main thread, which is signaled by - * condMutexNeedsBalancing. - */ - pthread_mutex_t *condMutex; - bool condMutexNeedsBalancing; - + pthread_mutex_t *reacquireMutex; void *stk; pid_t origNativeThreadID; @@ -515,8 +501,7 @@ thread_info_new(void) { tinfo->recrArg = nullptr; tinfo->recreatedThreadID = 0; tinfo->recreatedNativeThreadID = 0; - tinfo->condMutex = nullptr; - tinfo->condMutexNeedsBalancing = false; + tinfo->reacquireMutex = nullptr; tinfo->stk = MozTaggedAnonymousMmap(nullptr, NUWA_STACK_SIZE + getPageSize(), PROT_READ | PROT_WRITE, @@ -1031,16 +1016,13 @@ __wrap_pthread_cond_wait(pthread_cond_t *cond, return rv; } if (recreated && mtx) { - if (!freezePoint1) { - tinfo->condMutex = mtx; + if (!freezePoint1 && pthread_mutex_trylock(mtx)) { // The thread was frozen in pthread_cond_wait() after releasing mtx in the // Nuwa process. In recreating this thread, We failed to reacquire mtx // with the pthread_mutex_trylock() call, that is, mtx was acquired by // another thread. Because of this, we need the main thread's help to // reacquire mtx so that it will be in a valid state. - if (!pthread_mutex_trylock(mtx)) { - tinfo->condMutexNeedsBalancing = true; - } + tinfo->reacquireMutex = mtx; } RECREATE_CONTINUE(); RECREATE_PASS_VIP(); @@ -1070,11 +1052,8 @@ __wrap_pthread_cond_timedwait(pthread_cond_t *cond, return rv; } if (recreated && mtx) { - if (!freezePoint1) { - tinfo->condMutex = mtx; - if (!pthread_mutex_trylock(mtx)) { - tinfo->condMutexNeedsBalancing = true; - } + if (!freezePoint1 && pthread_mutex_trylock(mtx)) { + tinfo->reacquireMutex = mtx; } RECREATE_CONTINUE(); RECREATE_PASS_VIP(); @@ -1108,11 +1087,8 @@ __wrap___pthread_cond_timedwait(pthread_cond_t *cond, return rv; } if (recreated && mtx) { - if (!freezePoint1) { - tinfo->condMutex = mtx; - if (!pthread_mutex_trylock(mtx)) { - tinfo->condMutexNeedsBalancing = true; - } + if (!freezePoint1 && pthread_mutex_trylock(mtx)) { + tinfo->reacquireMutex = mtx; } RECREATE_CONTINUE(); RECREATE_PASS_VIP(); @@ -1427,12 +1403,8 @@ RecreateThreads() { RECREATE_BEFORE(tinfo); thread_recreate(tinfo); RECREATE_WAIT(); - if (tinfo->condMutex) { - // Synchronize with the recreated thread in pthread_cond_wait(). - REAL(pthread_mutex_lock)(tinfo->condMutex); - if (tinfo->condMutexNeedsBalancing) { - pthread_mutex_unlock(tinfo->condMutex); - } + if (tinfo->reacquireMutex) { + REAL(pthread_mutex_lock)(tinfo->reacquireMutex); } } else if(!(tinfo->flags & TINFO_FLAG_NUWA_SKIP)) { // An unmarked thread is found other than the main thread. From 16e718820ba8bfe1e3fc005fce51ffb7b8107235 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 22:11:18 -0700 Subject: [PATCH 19/38] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/5ea63273648d Author: Zac Desc: Revert "Bug 1033975 - Resolve Python suite crash handling" This reverts commit 9bfd3827d383e525a272c1825da0e1c1afcb626e. --- 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 ab04e15ed3dd..bc13a0201942 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d5c180524a001a9cafd769233c18c87c48285c9d", + "revision": "5ea63273648d6e809fccd2930a061ac6abb0c53e", "repo_path": "/integration/gaia-central" } From 58d9b586f922cb4c039e98f4123191f011c17842 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 22:14:22 -0700 Subject: [PATCH 20/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 5a758115d9cb..4a92283497ef 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 714dcb3785d8..16d1fe7ee14f 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 ea2aea377ea3..71ba521679c0 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 5a758115d9cb..4a92283497ef 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 07c3b0c26370..3fd12cdb35cd 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 18bd3325c2ec..871bbeed57dc 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 cb5841a6056f..4dceea81c2d3 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 f1bc8ede39b0..de5652f22145 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 8e5f9d1f8e04..135cdf1a2015 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From ccb651d4f455a70b6d7c11a3ac52eec645030c2b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 23:25:26 -0700 Subject: [PATCH 21/38] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/74f70f3c2504 Author: Julien Wajsberg Desc: Bug 1043293 - [Verticalhome] use "touchend" instead of "click" to launch applications r=kgrandon * attach the scroll event on the main window * remove stopImmediatePropagation from some locations so that the contextmenu event can be received by the grid * if the event is defaultPrevented, we don't do the default action, that is neither drag&drop (edit mode) or launch an 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 bc13a0201942..fcf4d6415e40 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "5ea63273648d6e809fccd2930a061ac6abb0c53e", + "revision": "74f70f3c250476ef7edd80364a0dafa8068c3c60", "repo_path": "/integration/gaia-central" } From 68822d053579a8500ca0080b87038751072ab775 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 31 Jul 2014 23:26:53 -0700 Subject: [PATCH 22/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 4a92283497ef..63455bd36b4e 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 16d1fe7ee14f..b3f85cadd0e6 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 71ba521679c0..69d44163f048 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 4a92283497ef..63455bd36b4e 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 3fd12cdb35cd..6f1bf81e085a 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 871bbeed57dc..791b3492e16e 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 4dceea81c2d3..3c7a9daf7185 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 de5652f22145..e4b3c8d3b883 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 135cdf1a2015..1bbfc87bd35f 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From a06a387b4cad9985dc07cfa9408d2b4f14562348 Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Fri, 1 Aug 2014 15:08:41 +0800 Subject: [PATCH 23/38] Bug 1044737 - 1/3: don't use Date in nsINetworkStatsCallback::networkStatsAvailable. r=vchang --- dom/system/gonk/NetworkService.js | 28 +++++++++++---------------- dom/system/gonk/nsINetworkService.idl | 4 ++-- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/dom/system/gonk/NetworkService.js b/dom/system/gonk/NetworkService.js index b81b7feb857e..b34f7129e8ad 100644 --- a/dom/system/gonk/NetworkService.js +++ b/dom/system/gonk/NetworkService.js @@ -124,41 +124,35 @@ NetworkService.prototype = { getNetworkInterfaceStats: function(networkName, callback) { if(DEBUG) debug("getNetworkInterfaceStats for " + networkName); - if (this.shutdown) { - return; - } - let file = new FileUtils.File("/proc/net/dev"); if (!file) { - callback.networkStatsAvailable(false, -1, -1, new Date()); + callback.networkStatsAvailable(false, 0, 0, Date.now()); return; } NetUtil.asyncFetch(file, function(inputStream, status) { - let result = { - success: true, // netd always return success even interface doesn't exist. - rxBytes: 0, - txBytes: 0 - }; - result.date = new Date(); + let rxBytes = 0, + txBytes = 0, + now = Date.now(); if (Components.isSuccessCode(status)) { // Find record for corresponding interface. let statExpr = /(\S+): +(\d+) +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +(\d+) +\d+ +\d+ +\d+ +\d+ +\d+ +\d+ +\d+/; - let data = NetUtil.readInputStreamToString(inputStream, - inputStream.available()).split("\n"); + let data = + NetUtil.readInputStreamToString(inputStream, inputStream.available()) + .split("\n"); for (let i = 2; i < data.length; i++) { let parseResult = statExpr.exec(data[i]); if (parseResult && parseResult[1] === networkName) { - result.rxBytes = parseInt(parseResult[2], 10); - result.txBytes = parseInt(parseResult[3], 10); + rxBytes = parseInt(parseResult[2], 10); + txBytes = parseInt(parseResult[3], 10); break; } } } - callback.networkStatsAvailable(result.success, result.rxBytes, - result.txBytes, result.date); + // netd always return success even interface doesn't exist. + callback.networkStatsAvailable(true, rxBytes, txBytes, now); }); }, diff --git a/dom/system/gonk/nsINetworkService.idl b/dom/system/gonk/nsINetworkService.idl index eb6cdbf07aa8..2bc8877b22de 100644 --- a/dom/system/gonk/nsINetworkService.idl +++ b/dom/system/gonk/nsINetworkService.idl @@ -19,13 +19,13 @@ interface nsIWifiTetheringCallback : nsISupports void wifiTetheringEnabledChange(in jsval error); }; -[scriptable, function, uuid(e079aa2a-ec0a-4bbd-b1a4-d81a9faae464)] +[scriptable, function, uuid(9c128e68-5e4b-4626-bb88-84ec54cce5d8)] interface nsINetworkStatsCallback : nsISupports { void networkStatsAvailable(in boolean success, in unsigned long rxBytes, in unsigned long txBytes, - in jsval date); + in unsigned long long timestamp); }; [scriptable, function, uuid(0706bfa2-ac2d-11e2-9a8d-7b6d988d4767)] From c494c71cd325c0440f7347dbc1adf4eb0d7f039c Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Fri, 1 Aug 2014 15:08:42 +0800 Subject: [PATCH 24/38] Bug 1044737 - 2/3: remove unused bits related to 'getNetworkInterfaceStats'. r=bholley, r=vchang --- dom/system/gonk/NetworkUtils.cpp | 54 ------------------------------- dom/system/gonk/NetworkUtils.h | 15 --------- dom/system/gonk/NetworkWorker.cpp | 3 -- dom/webidl/NetworkOptions.webidl | 6 ---- 4 files changed, 78 deletions(-) diff --git a/dom/system/gonk/NetworkUtils.cpp b/dom/system/gonk/NetworkUtils.cpp index 90ba37803d68..78062ff1271e 100644 --- a/dom/system/gonk/NetworkUtils.cpp +++ b/dom/system/gonk/NetworkUtils.cpp @@ -213,12 +213,6 @@ CommandFunc NetworkUtils::sStopDhcpServerChain[] = { NetworkUtils::setDhcpServerSuccess }; -CommandFunc NetworkUtils::sNetworkInterfaceStatsChain[] = { - NetworkUtils::getRxBytes, - NetworkUtils::getTxBytes, - NetworkUtils::networkInterfaceStatsSuccess -}; - CommandFunc NetworkUtils::sNetworkInterfaceEnableAlarmChain[] = { NetworkUtils::enableAlarm, NetworkUtils::setQuota, @@ -619,29 +613,6 @@ void NetworkUtils::clearWifiTetherParms(CommandChain* aChain, next(aChain, false, aResult); } -void NetworkUtils::getRxBytes(CommandChain* aChain, - CommandCallback aCallback, - NetworkResultOptions& aResult) -{ - char command[MAX_COMMAND_SIZE]; - snprintf(command, MAX_COMMAND_SIZE - 1, "interface readrxcounter %s", GET_CHAR(mIfname)); - - doCommand(command, aChain, aCallback); -} - -void NetworkUtils::getTxBytes(CommandChain* aChain, - CommandCallback aCallback, - NetworkResultOptions& aResult) -{ - NetworkParams& options = aChain->getParams(); - options.mRxBytes = atof(NS_ConvertUTF16toUTF8(aResult.mResultReason).get()); - - char command[MAX_COMMAND_SIZE]; - snprintf(command, MAX_COMMAND_SIZE - 1, "interface readtxcounter %s", GET_CHAR(mIfname)); - - doCommand(command, aChain, aCallback); -} - void NetworkUtils::enableAlarm(CommandChain* aChain, CommandCallback aCallback, NetworkResultOptions& aResult) @@ -994,20 +965,6 @@ void NetworkUtils::usbTetheringSuccess(CommandChain* aChain, postMessage(aChain->getParams(), aResult); } -void NetworkUtils::networkInterfaceStatsFail(NetworkParams& aOptions, NetworkResultOptions& aResult) -{ - postMessage(aOptions, aResult); -} - -void NetworkUtils::networkInterfaceStatsSuccess(CommandChain* aChain, - CommandCallback aCallback, - NetworkResultOptions& aResult) -{ - ASSIGN_FIELD(mRxBytes) - ASSIGN_FIELD_VALUE(mTxBytes, atof(NS_ConvertUTF16toUTF8(aResult.mResultReason).get())) - postMessage(aChain->getParams(), aResult); -} - void NetworkUtils::networkInterfaceAlarmFail(NetworkParams& aOptions, NetworkResultOptions& aResult) { postMessage(aOptions, aResult); @@ -1109,7 +1066,6 @@ void NetworkUtils::ExecuteCommand(NetworkParams aOptions) BUILD_ENTRY(removeHostRoutes), BUILD_ENTRY(addSecondaryRoute), BUILD_ENTRY(removeSecondaryRoute), - BUILD_ENTRY(getNetworkInterfaceStats), BUILD_ENTRY(setNetworkInterfaceAlarm), BUILD_ENTRY(enableNetworkInterfaceAlarm), BUILD_ENTRY(disableNetworkInterfaceAlarm), @@ -1517,16 +1473,6 @@ bool NetworkUtils::removeSecondaryRoute(NetworkParams& aOptions) return true; } -bool NetworkUtils::getNetworkInterfaceStats(NetworkParams& aOptions) -{ - DEBUG("getNetworkInterfaceStats: %s", GET_CHAR(mIfname)); - aOptions.mRxBytes = -1; - aOptions.mTxBytes = -1; - - RUN_CHAIN(aOptions, sNetworkInterfaceStatsChain, networkInterfaceStatsFail); - return true; -} - bool NetworkUtils::setNetworkInterfaceAlarm(NetworkParams& aOptions) { DEBUG("setNetworkInterfaceAlarms: %s", GET_CHAR(mIfname)); diff --git a/dom/system/gonk/NetworkUtils.h b/dom/system/gonk/NetworkUtils.h index bd722fad261b..00d47bbaa1a0 100644 --- a/dom/system/gonk/NetworkUtils.h +++ b/dom/system/gonk/NetworkUtils.h @@ -60,9 +60,6 @@ public: mDns1 = aOther.mDns1; mDns2 = aOther.mDns2; mDnses = aOther.mDnses; - mRxBytes = aOther.mRxBytes; - mTxBytes = aOther.mTxBytes; - mDate = aOther.mDate; mStartIp = aOther.mStartIp; mEndIp = aOther.mEndIp; mServerIp = aOther.mServerIp; @@ -136,9 +133,6 @@ public: COPY_OPT_STRING_FIELD(mDns1, EmptyString()) COPY_OPT_STRING_FIELD(mDns2, EmptyString()) COPY_SEQUENCE_FIELD(mDnses, nsString) - COPY_OPT_FIELD(mRxBytes, -1) - COPY_OPT_FIELD(mTxBytes, -1) - COPY_OPT_STRING_FIELD(mDate, EmptyString()) COPY_OPT_STRING_FIELD(mStartIp, EmptyString()) COPY_OPT_STRING_FIELD(mEndIp, EmptyString()) COPY_OPT_STRING_FIELD(mServerIp, EmptyString()) @@ -186,9 +180,6 @@ public: nsString mDns1; nsString mDns2; nsTArray mDnses; - float mRxBytes; - float mTxBytes; - nsString mDate; nsString mStartIp; nsString mEndIp; nsString mServerIp; @@ -271,7 +262,6 @@ private: bool removeNetworkRoute(NetworkParams& aOptions); bool addSecondaryRoute(NetworkParams& aOptions); bool removeSecondaryRoute(NetworkParams& aOptions); - bool getNetworkInterfaceStats(NetworkParams& aOptions); bool setNetworkInterfaceAlarm(NetworkParams& aOptions); bool enableNetworkInterfaceAlarm(NetworkParams& aOptions); bool disableNetworkInterfaceAlarm(NetworkParams& aOptions); @@ -297,7 +287,6 @@ private: static CommandFunc sUpdateUpStreamChain[]; static CommandFunc sStartDhcpServerChain[]; static CommandFunc sStopDhcpServerChain[]; - static CommandFunc sNetworkInterfaceStatsChain[]; static CommandFunc sNetworkInterfaceEnableAlarmChain[]; static CommandFunc sNetworkInterfaceDisableAlarmChain[]; static CommandFunc sNetworkInterfaceSetAlarmChain[]; @@ -317,8 +306,6 @@ private: static void startSoftAP(PARAMS); static void stopSoftAP(PARAMS); static void clearWifiTetherParms(PARAMS); - static void getRxBytes(PARAMS); - static void getTxBytes(PARAMS); static void enableAlarm(PARAMS); static void disableAlarm(PARAMS); static void setQuota(PARAMS); @@ -340,7 +327,6 @@ private: static void setInterfaceDns(PARAMS); static void wifiTetheringSuccess(PARAMS); static void usbTetheringSuccess(PARAMS); - static void networkInterfaceStatsSuccess(PARAMS); static void networkInterfaceAlarmSuccess(PARAMS); static void updateUpStreamSuccess(PARAMS); static void setDhcpServerSuccess(PARAMS); @@ -357,7 +343,6 @@ private: static void usbTetheringFail(PARAMS); static void updateUpStreamFail(PARAMS); static void setDhcpServerFail(PARAMS); - static void networkInterfaceStatsFail(PARAMS); static void networkInterfaceAlarmFail(PARAMS); static void setDnsFail(PARAMS); #undef PARAMS diff --git a/dom/system/gonk/NetworkWorker.cpp b/dom/system/gonk/NetworkWorker.cpp index 8d7dfe8be2a9..fa4769ef4c60 100644 --- a/dom/system/gonk/NetworkWorker.cpp +++ b/dom/system/gonk/NetworkWorker.cpp @@ -45,9 +45,6 @@ public: COPY_FIELD(mResultCode) COPY_FIELD(mResultReason) COPY_FIELD(mError) - COPY_FIELD(mRxBytes) - COPY_FIELD(mTxBytes) - COPY_FIELD(mDate) COPY_FIELD(mEnable) COPY_FIELD(mResult) COPY_FIELD(mSuccess) diff --git a/dom/webidl/NetworkOptions.webidl b/dom/webidl/NetworkOptions.webidl index 88b149eaf99e..ae3ff04b6d16 100644 --- a/dom/webidl/NetworkOptions.webidl +++ b/dom/webidl/NetworkOptions.webidl @@ -42,9 +42,6 @@ dictionary NetworkCommandOptions DOMString usbEndIp; // for "setWifiTethering". DOMString dns1; // for "setWifiTethering". DOMString dns2; // for "setWifiTethering". - float rxBytes; // for "getNetworkInterfaceStats". - float txBytes; // for "getNetworkInterfaceStats". - DOMString date; // for "getNetworkInterfaceStats". long threshold; // for "setNetworkInterfaceAlarm", // "enableNetworkInterfaceAlarm". DOMString startIp; // for "setDhcpServer". @@ -72,9 +69,6 @@ dictionary NetworkResultOptions DOMString resultReason = ""; // for all commands. boolean error = false; // for all commands. - float rxBytes = -1; // for "getNetworkInterfaceStats". - float txBytes = -1; // for "getNetworkInterfaceStats". - DOMString date = ""; // for "getNetworkInterfaceStats". boolean enable = false; // for "setWifiTethering", "setUSBTethering" // "enableUsbRndis". boolean result = false; // for "enableUsbRndis". From 13386a0233eaea407247e3327ec943d68a394610 Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Fri, 1 Aug 2014 15:08:42 +0800 Subject: [PATCH 25/38] Bug 1044737 - 3/3: fix NetworkStatsService::networkStatsAvailable and test cases. r=vchang --- dom/network/src/NetworkStatsService.jsm | 4 ++-- dom/network/tests/unit_stats/test_networkstats_service.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/network/src/NetworkStatsService.jsm b/dom/network/src/NetworkStatsService.jsm index 390e4607e877..ac078c0e6602 100644 --- a/dom/network/src/NetworkStatsService.jsm +++ b/dom/network/src/NetworkStatsService.jsm @@ -691,7 +691,7 @@ this.NetworkStatsService = { */ networkStatsAvailable: function networkStatsAvailable(aCallback, aNetId, aResult, aRxBytes, - aTxBytes, aDate) { + aTxBytes, aTimestamp) { if (!aResult) { if (aCallback) { aCallback(false, "Netd IPC error"); @@ -703,7 +703,7 @@ this.NetworkStatsService = { serviceType: "", networkId: this._networks[aNetId].network.id, networkType: this._networks[aNetId].network.type, - date: aDate, + date: new Date(aTimestamp), rxBytes: aTxBytes, txBytes: aRxBytes, isAccumulative: true }; diff --git a/dom/network/tests/unit_stats/test_networkstats_service.js b/dom/network/tests/unit_stats/test_networkstats_service.js index 2140d2c5b0a0..17738859e0bd 100644 --- a/dom/network/tests/unit_stats/test_networkstats_service.js +++ b/dom/network/tests/unit_stats/test_networkstats_service.js @@ -47,7 +47,7 @@ add_test(function test_networkStatsAvailable_ok() { NetworkStatsService.networkStatsAvailable(function (success, msg) { do_check_eq(success, true); run_next_test(); - }, netId, true, 1234, 4321, new Date()); + }, netId, true, 1234, 4321, Date.now()); }); }); @@ -58,7 +58,7 @@ add_test(function test_networkStatsAvailable_failure() { NetworkStatsService.networkStatsAvailable(function (success, msg) { do_check_eq(success, false); run_next_test(); - }, netId, false, 1234, 4321, new Date()); + }, netId, false, 1234, 4321, Date.now()); }); }); From 9a489e58e6d3ed6abb03cb29be90c5e82b6df34d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 02:10:30 -0700 Subject: [PATCH 26/38] Bumping gaia.json for 5 gaia revision(s) a=gaia-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/0fd144de4fa6 Author: Anthony Ricaud Desc: Merge pull request #22219 from Rik/reflows-967440 Bug 967440 - Remove some reflows on the keypad r=drs ======== https://hg.mozilla.org/integration/gaia-central/rev/8b2338336636 Author: Anthony Ricaud Desc: Bug 967440 - Remove some reflows on the keypad - Uses shared FontSizeUtils to compute the new sizes - Splits the font size changes and baseline into two different functions - Removes fake nodes from previous algorithm - call_screen.js use the single-line class rather than a test that could change - calls_handler.js and handled_call.js now have the responsability to call ensureFixedBaseline when necessary (aka when they are displaying a known contact) - In calls_handler.js scenario is always a second incoming call, the first one is handled by handled_call.js - utils_test.js has been cleaned and moved to jshint ======== https://hg.mozilla.org/integration/gaia-central/rev/94634c7ca515 Author: Julien Wajsberg Desc: Bug 944249 - [Messages] move the segment information request and size check and message type handling to compose.js r=schung * adds a MessageManager.getSegmentInfo function * ThreadUI sends a recipientschange event when recipients change * Compose sends a new event "segmentinfo" when that info changes * various other refactoring changes in Compose ======== https://hg.mozilla.org/integration/gaia-central/rev/ff3a9827ebf5 Author: Fernando Jiménez Moreno Desc: Merge pull request #22357 from ferjm/bug1046736.mobileidcc Bug 1046736 - [MobileID] Set default country code in phone number manual... ======== https://hg.mozilla.org/integration/gaia-central/rev/624f603e4c05 Author: Fernando Jiménez Desc: Bug 1046736 - [MobileID] Set default country code in phone number manual selection. r=alive --- 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 fcf4d6415e40..36b6ad68314b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "74f70f3c250476ef7edd80364a0dafa8068c3c60", + "revision": "0fd144de4fa60d4ff08af71be7e136532869b2f5", "repo_path": "/integration/gaia-central" } From ad3f88dd57df6566fa6f450fbfbe5e63973b21bb Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 02:12:12 -0700 Subject: [PATCH 27/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 63455bd36b4e..139e78ab248b 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 b3f85cadd0e6..31b7ee3b298d 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 69d44163f048..903281da258b 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 63455bd36b4e..139e78ab248b 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 6f1bf81e085a..58085ca87d25 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 791b3492e16e..e8b42b30959f 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 3c7a9daf7185..a3d8d09694e9 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 e4b3c8d3b883..f224c43e315f 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 1bbfc87bd35f..61112f7a3d60 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 8c03422b0d529870dff56a9253f6802167e5f135 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 02:15:33 -0700 Subject: [PATCH 28/38] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/45da2c0909b4 Author: Jose M. Cantera Desc: Merge pull request #22246 from ADLR-es/fix-bug-1003086 Bug 1003086 - [DSDS][Fugu][Buri]"Not imported" shown under "SIM card" in Contacts, after importing contacts in FTU ======== https://hg.mozilla.org/integration/gaia-central/rev/e8693ca099a6 Author: Adrián de la Rosa Desc: Bug 1003086 - [DSDS][Fugu][Buri]"Not imported" shown under "SIM card" in Contacts, after importing contacts in FTU (WIP) ======== https://hg.mozilla.org/integration/gaia-central/rev/4ee64becdabe Author: vingtetun <21@vingtetun.org> Desc: Merge pull request #22395 from vingtetun/fix-settings-integration-tets Bug 1045656 - Followup in order to fix settings integration tests. r=me ======== https://hg.mozilla.org/integration/gaia-central/rev/7db9e7d55f4e Author: Vivien Nicolas Desc: Bug 1045656 - Followup in order to fix settings integration tests. r=me --- 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 36b6ad68314b..b42e5909cc27 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "0fd144de4fa60d4ff08af71be7e136532869b2f5", + "revision": "45da2c0909b41e0215831d16977a7896bad11eec", "repo_path": "/integration/gaia-central" } From 5450bb9983bb65e15285845cd03a7eb21609e600 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 02:17:06 -0700 Subject: [PATCH 29/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 139e78ab248b..ecc05e7e7f81 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 31b7ee3b298d..6d3a7053f34c 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 903281da258b..44756c997b2f 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 139e78ab248b..ecc05e7e7f81 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 58085ca87d25..21af50b6e173 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 e8b42b30959f..5f5a769dbc4f 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 a3d8d09694e9..d26d4ff424bf 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 f224c43e315f..9c7232168d75 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 61112f7a3d60..cf99a2e705e8 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From f1c964cc953e9a0f1b09caaa4092bf0a8fc34e2f Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 1 Aug 2014 10:26:20 +0200 Subject: [PATCH 30/38] Bug 1046737: Use value to maintain Bluetooth bonding arrays, r=shuang The Bluedroid code uses indices into global arrays while pairing with devices. These arrays might get changed in between and the indices become incorrect. The result is undefined. The patch fixes the problem by using the value, a reply runnable, directly for array lookups. No indices are required. This bug was fixed in bluetooth2/ already, but not yet backported. --- .../bluedroid/BluetoothServiceBluedroid.cpp | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp index dbbf7630e4e9..ed0513bb561b 100644 --- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp +++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp @@ -1383,19 +1383,18 @@ BluetoothServiceBluedroid::UpdateSdpRecords( class CreateBondResultHandler MOZ_FINAL : public BluetoothResultHandler { public: - CreateBondResultHandler(size_t aRunnableIndex) - : mRunnableIndex(aRunnableIndex) + CreateBondResultHandler(BluetoothReplyRunnable* aRunnable) + : mRunnable(aRunnable) { } void OnError(int aStatus) MOZ_OVERRIDE { - BluetoothReplyRunnable* runnable = sBondingRunnableArray[mRunnableIndex]; - sBondingRunnableArray[mRunnableIndex] = nullptr; - ReplyStatusError(runnable, aStatus, NS_LITERAL_STRING("CreatedPairedDevice")); + sBondingRunnableArray.RemoveElement(mRunnable); + ReplyStatusError(mRunnable, aStatus, NS_LITERAL_STRING("CreatedPairedDevice")); } private: - PRUint32 mRunnableIndex; + BluetoothReplyRunnable* mRunnable; }; nsresult @@ -1410,10 +1409,10 @@ BluetoothServiceBluedroid::CreatePairedDeviceInternal( bt_bdaddr_t remoteAddress; StringToBdAddressType(aDeviceAddress, &remoteAddress); - PRUint32 i = sBondingRunnableArray.Length(); sBondingRunnableArray.AppendElement(aRunnable); - sBtInterface->CreateBond(&remoteAddress, new CreateBondResultHandler(i)); + sBtInterface->CreateBond(&remoteAddress, + new CreateBondResultHandler(aRunnable)); return NS_OK; } @@ -1421,19 +1420,18 @@ BluetoothServiceBluedroid::CreatePairedDeviceInternal( class RemoveBondResultHandler MOZ_FINAL : public BluetoothResultHandler { public: - RemoveBondResultHandler(size_t aRunnableIndex) - : mRunnableIndex(aRunnableIndex) + RemoveBondResultHandler(BluetoothReplyRunnable* aRunnable) + : mRunnable(aRunnable) { } void OnError(int aStatus) MOZ_OVERRIDE { - BluetoothReplyRunnable* runnable = sUnbondingRunnableArray[mRunnableIndex]; - sUnbondingRunnableArray[mRunnableIndex] = nullptr; - ReplyStatusError(runnable, aStatus, NS_LITERAL_STRING("RemoveDevice")); + sUnbondingRunnableArray.RemoveElement(mRunnable); + ReplyStatusError(mRunnable, aStatus, NS_LITERAL_STRING("RemoveDevice")); } private: - PRUint32 mRunnableIndex; + BluetoothReplyRunnable* mRunnable; }; nsresult @@ -1450,7 +1448,8 @@ BluetoothServiceBluedroid::RemoveDeviceInternal( PRUint32 i = sUnbondingRunnableArray.Length(); sUnbondingRunnableArray.AppendElement(aRunnable); - sBtInterface->RemoveBond(&remoteAddress, new RemoveBondResultHandler(i)); + sBtInterface->RemoveBond(&remoteAddress, + new RemoveBondResultHandler(aRunnable)); return NS_OK; } From 9017236675bf9f3b4c80b5d9abb4f78474ba91cb Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 03:25:30 -0700 Subject: [PATCH 31/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/ae002d0f0594 Author: Zibi Braniecki Desc: Merge pull request #22133 from zbraniecki/1043615-update-mozl10n-api-in-settings Bug 1043615 - Clean up mozL10n.get uses in Settings app. r=arthurcc ======== https://hg.mozilla.org/integration/gaia-central/rev/03dcc03523ef Author: Zbigniew Braniecki Desc: Bug 1043615 - Clean up mozL10n.get uses in Settings 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 b42e5909cc27..43449c3ad261 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "45da2c0909b41e0215831d16977a7896bad11eec", + "revision": "ae002d0f059431c1c7ab426293b15902f0083a5e", "repo_path": "/integration/gaia-central" } From 78fbe3d22b6c8c3dc90574830ad56d859cdb8722 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 03:32:42 -0700 Subject: [PATCH 32/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index ecc05e7e7f81..a2a7dc209019 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 6d3a7053f34c..e0585452fd4e 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 44756c997b2f..be7e51322177 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 ecc05e7e7f81..a2a7dc209019 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 21af50b6e173..e0adb5533c24 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 5f5a769dbc4f..00c18d628fe6 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 d26d4ff424bf..bf5995ae2f41 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 9c7232168d75..e59346453902 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 cf99a2e705e8..21b15b093b5f 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 76d2764769633b4034c91d9e4ba6a3818abfb6c4 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 03:40:31 -0700 Subject: [PATCH 33/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/f1b66be5c9f2 Author: vingtetun <21@vingtetun.org> Desc: Merge pull request #22392 from vingtetun/screenshoot-overlay-landing Move the screenshot overlay into .browser-container. r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/2de91d28db3f Author: Vivien Nicolas Desc: Move the screenshot overlay into .browser-container. r=alive --- 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 43449c3ad261..8f0f8f7c360e 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "ae002d0f059431c1c7ab426293b15902f0083a5e", + "revision": "f1b66be5c9f2ad9e0776c450740d562f7444b542", "repo_path": "/integration/gaia-central" } From a07ef42aff502e0d871ffbf2da7efb10b3032718 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 03:46:41 -0700 Subject: [PATCH 34/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a2a7dc209019..da4a41e81a60 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 e0585452fd4e..4e48b15aea48 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 be7e51322177..cb2f82fe3714 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 a2a7dc209019..da4a41e81a60 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index e0adb5533c24..7cc624e3eba2 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 00c18d628fe6..be3ae43b32f7 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 bf5995ae2f41..a927fadbad62 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 e59346453902..38faccf04a91 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 21b15b093b5f..1d52e8f046d5 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 43021c192888ee87b2d372dfe1043e01a5b28b67 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 03:55:31 -0700 Subject: [PATCH 35/38] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d52716b55323 Author: pacorampas Desc: Merge pull request #22393 from pacorampas/822645 Bug 822645 - [settings] Possible CSP problem r=arnau ======== https://hg.mozilla.org/integration/gaia-central/rev/e89cab5b6342 Author: Paco Rampas Desc: Bug 822645 - [settings] Possible CSP problem --- 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 8f0f8f7c360e..304cb675d340 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "f1b66be5c9f2ad9e0776c450740d562f7444b542", + "revision": "d52716b553233726a228a7c829351d4e97c8b548", "repo_path": "/integration/gaia-central" } From a30dff434065a50d1d940155234e3457a00a2e80 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 03:56:57 -0700 Subject: [PATCH 36/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index da4a41e81a60..1ec64a0789b0 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 4e48b15aea48..a9c5234099f9 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 cb2f82fe3714..67d27741ca3b 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 da4a41e81a60..1ec64a0789b0 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 7cc624e3eba2..b4198f64cdad 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 be3ae43b32f7..d9a146e97b75 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 a927fadbad62..09b7493eef09 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 38faccf04a91..6eb9c488a2ac 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 1d52e8f046d5..47dc60ad301e 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 677d2db9613b719b6f5864229f8d2cdf48fe6f1e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 04:40:31 -0700 Subject: [PATCH 37/38] Bumping gaia.json for 3 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/3842156466e7 Author: Zbigniew Braniecki Desc: Bug 1043615 - Update l10n ID's for strings modified with this change. r=flod ======== https://hg.mozilla.org/integration/gaia-central/rev/5b07856ac9d9 Author: Ed Morley Desc: Merge pull request #22400 from yurenju/test-l10n Bug 1047244 - gaia-build jobs failing with "build.test.js | Build GAIA f... ======== https://hg.mozilla.org/integration/gaia-central/rev/26a8b4897235 Author: Yuren Ju Desc: Bug 1047244 - gaia-build jobs failing with "build.test.js | Build GAIA from differece app list GAIA_DEVICE_TYPE=tablet" or "multilocale.test.js | multilocale Integration tests "before all" hook" --- 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 304cb675d340..ac5025ed7543 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d52716b553233726a228a7c829351d4e97c8b548", + "revision": "3842156466e71f41748f86777a1b8fbd379441c0", "repo_path": "/integration/gaia-central" } From 175f8c022f33545883039d4810b71d177c21eaa0 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Fri, 1 Aug 2014 04:46:34 -0700 Subject: [PATCH 38/38] Bumping manifests a=b2g-bump --- 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/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 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 1ec64a0789b0..d6b7b6d01fbb 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 a9c5234099f9..ce0428c1ac6f 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 67d27741ca3b..1d13daf77890 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 1ec64a0789b0..d6b7b6d01fbb 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index b4198f64cdad..6fbcd6cab73b 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 d9a146e97b75..f3c6b3be044c 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 09b7493eef09..ec6f85bfb1a6 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 6eb9c488a2ac..abf8f3108685 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 47dc60ad301e..d313fc9629a2 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - +