зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b4411b9620
Коммит
464195ce69
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче