feat(chromium): roll tot, ignore unknown session error (#13932)
After https://chromium-review.googlesource.com/c/chromium/src/+/3606712 browser returns an error to messages addressed to unknown session id (previously such messages would never get a response). #13637
This commit is contained in:
parent
0c2371cba9
commit
a919414553
|
|
@ -189,6 +189,8 @@ export class CRSession extends EventEmitter {
|
||||||
callback.reject(createProtocolError(callback.error, callback.method, object.error));
|
callback.reject(createProtocolError(callback.error, callback.method, object.error));
|
||||||
else
|
else
|
||||||
callback.resolve(object.result);
|
callback.resolve(object.result);
|
||||||
|
} else if (object.id && object.error?.code === -32001) {
|
||||||
|
// Message to a closed session, just ignore it.
|
||||||
} else {
|
} else {
|
||||||
assert(!object.id);
|
assert(!object.id);
|
||||||
Promise.resolve().then(() => {
|
Promise.resolve().then(() => {
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export type ProtocolResponse = {
|
||||||
id?: number;
|
id?: number;
|
||||||
method?: string;
|
method?: string;
|
||||||
sessionId?: string;
|
sessionId?: string;
|
||||||
error?: { message: string; data: any; };
|
error?: { message: string; data: any; code?: number };
|
||||||
params?: any;
|
params?: any;
|
||||||
result?: any;
|
result?: any;
|
||||||
pageProxyId?: string;
|
pageProxyId?: string;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue