playwright-core 1.55.0-alpha-2025-07-12 → 1.55.0-alpha-2025-07-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browsers.json
CHANGED
|
@@ -319,6 +319,8 @@ class DispatcherConnection {
|
|
|
319
319
|
await sdkObject.instrumentation.onBeforeCall(sdkObject, callMetadata);
|
|
320
320
|
const response = { id };
|
|
321
321
|
try {
|
|
322
|
+
if (this._dispatcherByGuid.get(guid) !== dispatcher)
|
|
323
|
+
throw new import_errors.TargetClosedError(closeReason(sdkObject));
|
|
322
324
|
const result = await dispatcher._runCommand(callMetadata, method, validParams);
|
|
323
325
|
const validator = (0, import_validator.findValidator)(dispatcher._type, method, "Result");
|
|
324
326
|
response.result = validator(result, "", this._validatorToWireContext());
|
|
@@ -27,6 +27,7 @@ class TracingDispatcher extends import_dispatcher.Dispatcher {
|
|
|
27
27
|
constructor(scope, tracing) {
|
|
28
28
|
super(scope, tracing, "Tracing", {});
|
|
29
29
|
this._type_Tracing = true;
|
|
30
|
+
this._started = false;
|
|
30
31
|
}
|
|
31
32
|
static from(scope, tracing) {
|
|
32
33
|
const result = scope.connection.existingDispatcher(tracing);
|
|
@@ -34,6 +35,7 @@ class TracingDispatcher extends import_dispatcher.Dispatcher {
|
|
|
34
35
|
}
|
|
35
36
|
async tracingStart(params, progress) {
|
|
36
37
|
this._object.start(params);
|
|
38
|
+
this._started = true;
|
|
37
39
|
}
|
|
38
40
|
async tracingStartChunk(params, progress) {
|
|
39
41
|
return await this._object.startChunk(progress, params);
|
|
@@ -50,8 +52,15 @@ class TracingDispatcher extends import_dispatcher.Dispatcher {
|
|
|
50
52
|
return { artifact: artifact ? import_artifactDispatcher.ArtifactDispatcher.from(this, artifact) : void 0, entries };
|
|
51
53
|
}
|
|
52
54
|
async tracingStop(params, progress) {
|
|
55
|
+
this._started = false;
|
|
53
56
|
await this._object.stop(progress);
|
|
54
57
|
}
|
|
58
|
+
_onDispose() {
|
|
59
|
+
if (this._started)
|
|
60
|
+
this._object.stopChunk(void 0, { mode: "discard" }).then(() => this._object.stop(void 0)).catch(() => {
|
|
61
|
+
});
|
|
62
|
+
this._started = false;
|
|
63
|
+
}
|
|
55
64
|
}
|
|
56
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
57
66
|
0 && (module.exports = {
|
|
@@ -247,7 +247,8 @@ class Tracing extends import_instrumentation.SdkObject {
|
|
|
247
247
|
this._closeAllGroups();
|
|
248
248
|
this._harTracer.stop();
|
|
249
249
|
this.flushHarEntries();
|
|
250
|
-
|
|
250
|
+
const promise = progress ? progress.race(this._fs.syncAndGetError()) : this._fs.syncAndGetError();
|
|
251
|
+
await promise.finally(() => {
|
|
251
252
|
this._state = void 0;
|
|
252
253
|
});
|
|
253
254
|
}
|
|
@@ -307,7 +308,8 @@ class Tracing extends import_instrumentation.SdkObject {
|
|
|
307
308
|
const zipFileName = this._state.traceFile + ".zip";
|
|
308
309
|
if (params.mode === "archive")
|
|
309
310
|
this._fs.zip(entries, zipFileName);
|
|
310
|
-
const
|
|
311
|
+
const promise = progress ? progress.race(this._fs.syncAndGetError()) : this._fs.syncAndGetError();
|
|
312
|
+
const error = await promise.catch((e) => e);
|
|
311
313
|
this._isStopping = false;
|
|
312
314
|
if (this._state)
|
|
313
315
|
this._state.recording = false;
|