зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1623350 - Convert exited response to an error. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D67456 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2c6d4bea78
Коммит
4a3b5e2165
|
@ -672,7 +672,7 @@ where *tabThreadActor* is the name of a thread-like actor representing the tab's
|
|||
If the user closes the tab before the client attaches to it, *targetActor* replies:
|
||||
|
||||
```
|
||||
{ "from":<targetActor>, "type":"exited" }
|
||||
{ "from":<targetActor>, "error":"exited" }
|
||||
```
|
||||
|
||||
When the client is no longer interested in interacting with the tab, the client can request:
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
|
||||
/* global XPCNativeWrapper */
|
||||
|
||||
// protocol.js uses objects as exceptions in order to define
|
||||
// error packets.
|
||||
/* eslint-disable no-throw-literal */
|
||||
|
||||
/*
|
||||
* BrowsingContextTargetActor is an abstract class used by target actors that hold
|
||||
* documents, such as frames, chrome windows, etc.
|
||||
|
@ -988,7 +992,9 @@ const browsingContextTargetPrototype = {
|
|||
|
||||
attach(request) {
|
||||
if (this.exited) {
|
||||
return { type: "exited" };
|
||||
throw {
|
||||
error: "exited",
|
||||
};
|
||||
}
|
||||
|
||||
this._attach();
|
||||
|
|
Загрузка…
Ссылка в новой задаче