зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1682780 - [devtools] Remove special hack around ThreadActor.attach from protocol.js internals. r=nchevobbe,jdescottes
This is no longer necessary as attach is no longer entering in a nested event loop. And so we can have attach to complete and return its value as any other request. Differential Revision: https://phabricator.services.mozilla.com/D100045
This commit is contained in:
Родитель
6fbec57619
Коммит
31c22e4866
|
@ -412,11 +412,6 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
|||
this.dbg.allowUnobservedAsmJS = !this._options.observeAsmJS;
|
||||
}
|
||||
|
||||
// Send the response to the attach request now (rather than
|
||||
// returning it), because protocol.js contains a hack just for this one method.
|
||||
// But this is no longer needed and this can be removed in a dedicated followup.
|
||||
this.conn.send({ from: this.actorID });
|
||||
|
||||
// Set everything up so that breakpoint can work
|
||||
this._setupForBreaking();
|
||||
|
||||
|
|
|
@ -176,12 +176,6 @@ var generateRequestHandlers = function(actorSpec, actorProto) {
|
|||
// No need to send a response.
|
||||
return;
|
||||
}
|
||||
// `ThreadActor.attach` manually send the response in middle of its processing
|
||||
// using `DevToolsServerConnection.send` manually. So that it isn't a oneway method,
|
||||
// but we shouldn't try to emit a response here, or it would be duplicated.
|
||||
if (spec.name == "attach" && actorProto.typeName == "thread") {
|
||||
return;
|
||||
}
|
||||
if (this.isDestroyed()) {
|
||||
console.error(
|
||||
`Tried to send a '${spec.name}' method reply on an already destroyed actor` +
|
||||
|
|
Загрузка…
Ссылка в новой задаче