Backed out changeset 54c770bf243e (bug 1194525) for apparently causing a spike in gij(11/12) failures a=merge

This commit is contained in:
Wes Kocher 2015-11-02 13:29:30 -08:00
parent 78adfe0755
commit 9e7ef16d9a
3 changed files with 8 additions and 14 deletions

View File

@ -36,10 +36,9 @@ ActivityRequestHandler.prototype = {
this._window = aWindow;
},
__init: function arh___init(aId, aOptions, aReturnValue) {
__init: function arh___init(aId, aOptions) {
this._id = aId;
this._options = aOptions;
this._returnValue = aReturnValue;
},
get source() {
@ -50,13 +49,11 @@ ActivityRequestHandler.prototype = {
},
postResult: function arh_postResult(aResult) {
if (this._returnValue) {
cpmm.sendAsyncMessage("Activity:PostResult", {
"id": this._id,
"result": aResult
});
Services.obs.notifyObservers(null, "activity-success", this._id);
}
cpmm.sendAsyncMessage("Activity:PostResult", {
"id": this._id,
"result": aResult
});
Services.obs.notifyObservers(null, "activity-success", this._id);
},
postError: function arh_postError(aError) {

View File

@ -37,10 +37,7 @@ ActivityWrapper.prototype = {
// Activity workflow.
cpmm.sendAsyncMessage("Activity:Ready", { id: aMessage.id });
// Gecko should ignore |postResult| calls for WebActivities with no returnValue
// We need to pass returnValue to ActivityRequestHandler constructor to then properly
// decide if should call postResult or not
let handler = new aWindow.ActivityRequestHandler(aMessage.id, aMessage.payload, aMessage.target.returnValue);
let handler = new aWindow.ActivityRequestHandler(aMessage.id, aMessage.payload);
// When the activity window is closed, fire an error to notify the activity
// caller of the situation.

View File

@ -4,7 +4,7 @@
[Pref="dom.sysmsg.enabled",
JSImplementation="@mozilla.org/dom/activities/request-handler;1",
ChromeConstructor(DOMString id, optional ActivityOptions options, optional boolean returnvalue),
ChromeConstructor(DOMString id, optional ActivityOptions options),
ChromeOnly]
interface ActivityRequestHandler
{