Bug 912164 - Timestamp property is no longer set for app.launch(). r=fabrice

This commit is contained in:
Marco Castelluccio 2013-09-06 14:18:21 -04:00
parent 9bfc81af4d
commit 5be2415cd1
2 changed files with 6 additions and 3 deletions

View File

@ -993,6 +993,7 @@ this.DOMApplicationRegistry = {
this.launch(
aData.manifestURL,
aData.startPoint,
aData.timestamp,
function onsuccess() {
aMm.sendAsyncMessage("Webapps:Launch:Return:OK", aData);
},
@ -1002,7 +1003,7 @@ this.DOMApplicationRegistry = {
);
},
launch: function launch(aManifestURL, aStartPoint, aOnSuccess, aOnFailure) {
launch: function launch(aManifestURL, aStartPoint, aTimeStamp, aOnSuccess, aOnFailure) {
let app = this.getAppByManifestURL(aManifestURL);
if (!app) {
aOnFailure("NO_SUCH_APP");
@ -1020,6 +1021,7 @@ this.DOMApplicationRegistry = {
// stringified as an empty object. (see bug 830376)
let appClone = AppsUtils.cloneAppObject(app);
appClone.startPoint = aStartPoint;
appClone.timestamp = aTimeStamp;
Services.obs.notifyObservers(null, "webapps-launch", JSON.stringify(appClone));
aOnSuccess();
},

View File

@ -607,10 +607,11 @@ WebappsActor.prototype = {
}
let defer = promise.defer();
let reg = DOMApplicationRegistry;
reg.launch(
DOMApplicationRegistry.launch(
aRequest.manifestURL,
aRequest.startPoint || "",
Date.now(),
function onsuccess() {
defer.resolve({});
},