You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to some debugging with a customer, we found an interesting "edge" case that can trigger an infinite loop via console logs.
The situation is like this (WARNING: If you run this with console log recording enabled your browser will freeze).
lettarget={foo: "bar"};consthandler={get(target,prop,receiver){if(prop==="foo"){console.warn("foo was accessed. This shouldn't be done... Context:",target)}returnReflect.get(...arguments);},};constproxy=newProxy(target,handler);target.proxy=proxyconsole.log(proxy);
This triggers the proxied get call which itself is logging a warning
... which triggers Step 2 and now we have a loop 🙈
This is probably something where the fix would need to be in rrweb but I wonder if there is a way we could at least detect this and stop the infinite loop occurring...
The text was updated successfully, but these errors were encountered:
Fix is mentioned here. I think we might publish our own forked version of rrweb so we can control this flow a bit better and contribute back to the core
Thanks to some debugging with a customer, we found an interesting "edge" case that can trigger an infinite loop via console logs.
The situation is like this (WARNING: If you run this with console log recording enabled your browser will freeze).
proxy
objectget
call which itself is logging a warningThis is probably something where the fix would need to be in
rrweb
but I wonder if there is a way we could at least detect this and stop the infinite loop occurring...The text was updated successfully, but these errors were encountered: