author | Wes Kocher <wkocher@mozilla.com> |
Mon, 02 Nov 2015 13:29:30 -0800 | |
changeset 270813 | 9f69202d82752e093a653a8f15b0274e347db33a |
parent 270812 | c5c5874b08f3bc150536123d86050db2913200eb |
child 270821 | f9b3df44993160df629d7d13466ccf00895245a5 |
child 270837 | 98729e8f5395b6e1e3dd1c9b26f68bdc8a143b11 |
child 270886 | f2b3556816ef97bfa720832c43815a0054d9f0a3 |
push id | 29623 |
push user | kwierso@gmail.com |
push date | Mon, 02 Nov 2015 23:12:59 +0000 |
treeherder | mozilla-central@9f69202d8275 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | merge |
bugs | 1194525 |
milestone | 45.0a1 |
backs out | 54c770bf243e3c3b86d3b5cca0c9b52abd627dd1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/activities/ActivityRequestHandler.js +++ b/dom/activities/ActivityRequestHandler.js @@ -31,37 +31,34 @@ function ActivityRequestHandler() { // ActivityRequestHandler object. } ActivityRequestHandler.prototype = { init: function arh_init(aWindow) { 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() { // We need to clone this object because the this._options.data has // the type any in WebIDL which will cause the binding layer to pass // the value which is a COW unmodified to content. return Cu.cloneInto(this._options, this._window); }, 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) { cpmm.sendAsyncMessage("Activity:PostError", { "id": this._id, "error": aError }); Services.obs.notifyObservers(null, "activity-error", this._id);
--- a/dom/activities/ActivityWrapper.js +++ b/dom/activities/ActivityWrapper.js @@ -32,20 +32,17 @@ ActivityWrapper.prototype = { debug("Wrapping " + JSON.stringify(aMessage)); // This message is useful to communicate that the activity message has been // properly received by the app. If the app will be killed, the // ActivitiesService will be able to fire an error and complete the // 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. // We don't need to check whether the activity itself already sent // back something since ActivitiesService.jsm takes care of that. let util = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); let innerWindowID = util.currentInnerWindowID;
--- a/dom/webidl/ActivityRequestHandler.webidl +++ b/dom/webidl/ActivityRequestHandler.webidl @@ -1,15 +1,15 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ [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 { [UnsafeInPrerendering] void postResult(any result); [UnsafeInPrerendering] void postError(DOMString error); [Pure, Cached, Frozen]