From b3857bd69038f2cbb652858345d4dbd7618eb3eb Mon Sep 17 00:00:00 2001 From: Christian Davis Date: Tue, 17 Oct 2017 21:24:34 -0500 Subject: [PATCH] fix(page): page.close() assert that connection is not closed (#1038) --- lib/Connection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Connection.js b/lib/Connection.js index fa4501b0335..dbf1ea8fc54 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -201,6 +201,7 @@ class Session extends EventEmitter { } async dispose() { + console.assert(!!this._connection, 'Protocol error: Connection closed. Most likely the page has been closed.'); await this._connection.send('Target.closeTarget', {targetId: this._targetId}); }