Skip to content

Commit

Permalink
isContextLost is particularly noisy, being called almost constantly…
Browse files Browse the repository at this point in the history
  • Loading branch information
eoghanmurray committed Oct 7, 2022
1 parent 3edeb06 commit d8bdaa1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/rrweb/src/record/observers/canvas/webgl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ function patchGLPrototype(
const props = Object.getOwnPropertyNames(prototype);

for (const prop of props) {
if (
//prop.startsWith('get') || // e.g. getProgramParameter, but too risky
['isContextLost', 'canvas', 'drawingBufferWidth', 'drawingBufferHeight'].includes(prop)) {
// skip read only propery/functions
continue;
}
try {
if (typeof prototype[prop as keyof typeof prototype] !== 'function') {
continue;
Expand Down

0 comments on commit d8bdaa1

Please sign in to comment.