Current section

Files

Jump to
playwright priv static console-debug.patch
Raw

priv/static/console-debug.patch

diff --git a/priv/static/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js b/priv/static/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js
index 13080cd..0fb60d3 100644
--- a/priv/static/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js
+++ b/priv/static/node_modules/playwright-core/lib/server/dispatchers/dispatcher.js
@@ -111,7 +111,7 @@ class Dispatcher extends _events.EventEmitter {
this._disposeRecursively(new _errors.TargetClosedError());
this._connection.sendDispose(this, reason);
}
- _onDispose() {}
+ _onDispose() { }
_disposeRecursively(error) {
var _this$_parent;
(0, _utils.assert)(!this._disposed, `${this._guid} is disposed more than once`);
@@ -164,7 +164,7 @@ class DispatcherConnection {
constructor(isLocal) {
this._dispatchers = new Map();
this._dispatchersByBucket = new Map();
- this.onmessage = message => {};
+ this.onmessage = message => { };
this._waitOperations = new Map();
this._isLocal = void 0;
this._isLocal = !!isLocal;
@@ -258,6 +258,7 @@ class DispatcherConnection {
}
}
async dispatch(message) {
+ console.info("dispatcher.js:261 - dispatch", message);
var _sdkObject$attributio, _sdkObject$attributio2, _params$info;
const {
id,
@@ -268,6 +269,7 @@ class DispatcherConnection {
} = message;
const dispatcher = this._dispatchers.get(guid);
if (!dispatcher) {
+ console.info("dispatcher.js:272 - dispatch w/ TargetClosedError", id, guid);
this.onmessage({
id,
error: (0, _errors.serializeError)(new _errors.TargetClosedError())
@@ -392,4 +394,4 @@ exports.DispatcherConnection = DispatcherConnection;
function closeReason(sdkObject) {
var _sdkObject$attributio3, _sdkObject$attributio4, _sdkObject$attributio5;
return ((_sdkObject$attributio3 = sdkObject.attribution.page) === null || _sdkObject$attributio3 === void 0 ? void 0 : _sdkObject$attributio3._closeReason) || ((_sdkObject$attributio4 = sdkObject.attribution.context) === null || _sdkObject$attributio4 === void 0 ? void 0 : _sdkObject$attributio4._closeReason) || ((_sdkObject$attributio5 = sdkObject.attribution.browser) === null || _sdkObject$attributio5 === void 0 ? void 0 : _sdkObject$attributio5._closeReason);
-}
\ No newline at end of file
+}
diff --git a/priv/static/node_modules/playwright-core/lib/server/transport.js b/priv/static/node_modules/playwright-core/lib/server/transport.js
index b798268..44ccd42 100644
--- a/priv/static/node_modules/playwright-core/lib/server/transport.js
+++ b/priv/static/node_modules/playwright-core/lib/server/transport.js
@@ -143,6 +143,7 @@ class WebSocketTransport {
this._ws.close();
return;
}
+ console.warn("transport.js:146 - RECV", parsedJson);
try {
if (this.onmessage) this.onmessage.call(null, parsedJson);
} catch (e) {
@@ -164,6 +165,7 @@ class WebSocketTransport {
});
}
send(message) {
+ console.warn("transport.js:168 - SEND", message);
this._ws.send(JSON.stringify(message));
}
close() {
@@ -188,4 +190,4 @@ function stripQueryParams(url) {
} catch {
return url;
}
-}
\ No newline at end of file
+}