зеркало из https://github.com/mozilla/gecko-dev.git
bug 1606818: remote: use nsIHttpServer for unregistering handler r=remote-protocol-reviewers,whimboo
nsIHttpServer.registerPathHandler() is designed to take null as the second argument to unregister path handlers. This saves us from having to modify its internal state, and fixes a minor TODO in the remote agent initialisation code. Differential Revision: https://phabricator.services.mozilla.com/D58605 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4ff0799afe
Коммит
9444fa34c7
|
@ -76,9 +76,7 @@ class RemoteAgentClass {
|
|||
this.server.registerPathHandler(target.path, target);
|
||||
});
|
||||
this.targets.on("target-destroyed", (eventName, target) => {
|
||||
// TODO: removes the entry added by registerPathHandler,
|
||||
// but we should instead have nsIHttpServer.unregisterPathHandler
|
||||
delete this.server._handler._overridePaths[target.path];
|
||||
this.server.registerPathHandler(target.path, null);
|
||||
});
|
||||
|
||||
return this.asyncListen(host, port);
|
||||
|
|
Загрузка…
Ссылка в новой задаче