☠☠ backed out by 96b5a734399c ☠ ☠ | |
author | Jim Chen <nchen@mozilla.com> |
Tue, 05 Sep 2017 15:27:36 -0400 | |
changeset 378985 | 1cc1955d6af318c6d57e483b70618a6f59e52681 |
parent 378984 | a9b1cbbeea9adc3666faad75c6a4b9868da09252 |
child 378986 | f069f3c695977904c4b2dda44a5218efe17d28b5 |
push id | 50463 |
push user | nchen@mozilla.com |
push date | Tue, 05 Sep 2017 19:31:32 +0000 |
treeherder | autoland@f069f3c69597 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | esawin |
bugs | 1394580 |
milestone | 57.0a1 |
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/mobile/android/modules/geckoview/Messaging.jsm +++ b/mobile/android/modules/geckoview/Messaging.jsm @@ -191,30 +191,30 @@ DispatcherDelegate.prototype = { this._requestHandler.listeners[event] = undefined; this.unregisterListener(this._requestHandler, event); }, _requestHandler: { listeners: {}, - onEvent: Task.async(function* (event, data, callback) { - try { - let response = yield this.listeners[event](data.data); + onEvent: function(event, data, callback) { + let self = this; + Task.spawn(function*() { + return yield self.listeners[event](data.data); + }).then(response => { callback.onSuccess(response); - - } catch (e) { + }, error => { Cu.reportError("Error in Messaging handler for " + event + ": " + e); - callback.onError({ message: e.message || (e && e.toString()), stack: e.stack || Components.stack.formattedStack, }); - } - }), + }); + }, }, }; var EventDispatcher = { instance: new DispatcherDelegate(IS_PARENT_PROCESS ? Services.androidBridge : undefined), for: function(aWindow) { let view = aWindow && aWindow.arguments && aWindow.arguments[0] &&