@sentry/replay 10.71.0 → 10.72.0
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/build/npm/cjs/index.js +9 -1
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/esm/index.js +9 -1
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/types/eventBuffer/EventBufferProxy.d.ts.map +1 -1
- package/build/npm/types/eventBuffer/WorkerHandler.d.ts.map +1 -1
- package/build/npm/types/eventBuffer/error.d.ts +4 -0
- package/build/npm/types/eventBuffer/error.d.ts.map +1 -1
- package/build/npm/types-ts3.8/eventBuffer/error.d.ts +4 -0
- package/package.json +4 -4
package/build/npm/esm/index.js
CHANGED
|
@@ -5292,6 +5292,11 @@ class EventBufferSizeExceededError extends Error {
|
|
|
5292
5292
|
super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);
|
|
5293
5293
|
}
|
|
5294
5294
|
}
|
|
5295
|
+
class WorkerDestroyedError extends Error {
|
|
5296
|
+
constructor() {
|
|
5297
|
+
super("Worker destroyed");
|
|
5298
|
+
}
|
|
5299
|
+
}
|
|
5295
5300
|
|
|
5296
5301
|
class EventBufferArray {
|
|
5297
5302
|
constructor() {
|
|
@@ -5411,7 +5416,7 @@ class WorkerHandler {
|
|
|
5411
5416
|
destroy() {
|
|
5412
5417
|
DEBUG_BUILD && debug.log("Destroying compression worker");
|
|
5413
5418
|
this._worker.removeEventListener("message", this._onMessage);
|
|
5414
|
-
this._pending.forEach((pending) => pending.reject(new
|
|
5419
|
+
this._pending.forEach((pending) => pending.reject(new WorkerDestroyedError()));
|
|
5415
5420
|
this._pending.clear();
|
|
5416
5421
|
this._worker.terminate();
|
|
5417
5422
|
}
|
|
@@ -5608,6 +5613,9 @@ class EventBufferProxy {
|
|
|
5608
5613
|
await Promise.all(addEventPromises);
|
|
5609
5614
|
this._fallback.clear();
|
|
5610
5615
|
} catch (error) {
|
|
5616
|
+
if (error instanceof WorkerDestroyedError) {
|
|
5617
|
+
return;
|
|
5618
|
+
}
|
|
5611
5619
|
DEBUG_BUILD && debug.exception(error, "Failed to add events when switching buffers.");
|
|
5612
5620
|
}
|
|
5613
5621
|
}
|