mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
waitTask should survive cross-process navigation (#435)
In case of cross-process navigation, we receive a context which is immediately getting destroyed. Fixes #396.
This commit is contained in:
@@ -419,6 +419,11 @@ class WaitTask {
|
||||
if (error && error.message.includes('Execution context was destroyed'))
|
||||
return;
|
||||
|
||||
// We could have tried to evaluate in a context which was already
|
||||
// destroyed.
|
||||
if (error && error.message.includes('Cannot find context with specified id'))
|
||||
return;
|
||||
|
||||
if (error)
|
||||
this._reject(error);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user