Bug 1518777 - make stoplisteners use promise style callbacks; r=ochameau

Differential Revision: https://phabricator.services.mozilla.com/D16680

--HG--
extra : moz-landing-system : lando
This commit is contained in:
yulia 2019-01-24 11:50:34 +00:00
Родитель b4411b9620
Коммит 464195ce69
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -668,13 +668,13 @@ WebConsoleClient.prototype = {
* @return request
* Request object that implements both Promise and EventEmitter interfaces
*/
stopListeners: function(listeners, onResponse) {
stopListeners: function(listeners) {
const packet = {
to: this.actorID,
type: "stopListeners",
listeners: listeners,
};
return this._client.request(packet, onResponse);
return this._client.request(packet);
},
/**

Просмотреть файл

@ -46,8 +46,8 @@ function onStartPageErrorAndConsoleAPI(aState, aResponse)
ok(!aResponse.nativeConsoleAPI, "!nativeConsoleAPI");
top.console = top.console_;
aState.client.stopListeners(["ConsoleAPI", "foo"],
onStopConsoleAPI.bind(null, aState));
aState.client.stopListeners(["ConsoleAPI", "foo"])
.then(onStopConsoleAPI.bind(null, aState));
}
function onStopConsoleAPI(aState, aResponse)