Skip to content

Commit

Permalink
re-throw in callback wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Dec 20, 2023
1 parent a029ef4 commit 01b7528
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/rrweb/src/record/observers/canvas/canvas-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import initCanvasContextObserver from './canvas';
import initCanvasWebGLMutationObserver from './webgl';
import ImageBitmapDataURLWorker from 'web-worker:../../workers/image-bitmap-data-url-worker.ts';
import type { ImageBitmapDataURLRequestWorker } from '../../workers/image-bitmap-data-url-worker';
import { callbackWrapper } from '../../error-handler';

export type RafStamps = { latestId: number; invokeId: number | null };

Expand Down Expand Up @@ -110,6 +111,7 @@ export class CanvasManager implements CanvasManagerInterface {
this.mutationCb = options.mutationCb;
this.mirror = options.mirror;


if (recordCanvas && sampling === 'all')
this.initCanvasMutationObserver(
win,
Expand Down Expand Up @@ -269,8 +271,8 @@ export class CanvasManager implements CanvasManagerInterface {
[bitmap],
);
})
.catch(() => {
// noop
.catch((error) => {
callbackWrapper(() => {throw error});
});
});
rafId = requestAnimationFrame(takeCanvasSnapshots);
Expand Down

0 comments on commit 01b7528

Please sign in to comment.