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
use Proxy instead of function, so property modification also gets taken care of correctly.
add analysis for multi-patching of same function/callback
→ We have started adding that info to GlobalView → Patched_Callbacks
ideally: don't nest patched functions/callbacks under any circumstances
(e.g. we might get: patchedCallback -> patchedThenCb)
NOTE: patchedFunctions are instrumented un-instrumented functions while patchedCbs are instrumented recorded functions. The two sets should never overlap.
test: javascript-algorithms errors out
might be caused by jest-snapshot
test: require.resolve should never be patched
Remaining Problems
Some problems are still generally unsolved (and require some hacky workaround):
Consumer of a function relies on equality checks (e.g. addEventListener vs. removeEventListener)
add custom fix for removeEventListener and similar
E.g., using our current proxy solution, f does not retain identity when handled by uninstrumented code:
determine heuristics to detect and avoid "instrumenting the instrumentors"
Generally speaking, it is a bad idea to instrument the instrumenters, since that can lead to infinite loops and other bugs.
E.g. the old problem of graceful-fs instrumenting process.cwd → which in Node@14 was used internally by Node when reading sourcemaps when generating stacktraces → which triggered Dbux recording
Done
fix: react-tic-tac-toe does not render if CallbackPatcher is Enabled.
Domiii
changed the title
Dynamic callback patcher: tracing react (and others) is currently broken
Dynamic callback patcher: tracing react (and others) breaks them
Jan 9, 2022
Domiii
changed the title
Dynamic callback patcher: tracing react (and others) breaks them
fix dynamic callback patcher: use Proxy instead of functionJan 16, 2022
Domiii
changed the title
fix dynamic callback patcher: use Proxy instead of function
fix dynamic callback patcher: make things more versatile
Feb 20, 2022
Proxy
instead offunction
, so property modification also gets taken care of correctly.GlobalView
→Patched_Callbacks
patchedCallback
->patchedThenCb
)patchedFunctions
are instrumented un-instrumented functions whilepatchedCbs
are instrumented recorded functions. The two sets should never overlap.javascript-algorithms
errors outjest-snapshot
require.resolve
should never be patchedRemaining Problems
Some problems are still generally unsolved (and require some hacky workaround):
addEventListener
vs.removeEventListener
)removeEventListener
and similarE.g., using our current proxy solution,
f
does not retain identity when handled by uninstrumented code:More Future Work
graceful-fs
instrumentingprocess.cwd
→ which in Node@14 was used internally by Node when reading sourcemaps when generating stacktraces → which triggered Dbux recordingDone
react-tic-tac-toe
does not render ifCallbackPatcher
isEnabled
.addEventListener
->removeEventListener
callback identityThe text was updated successfully, but these errors were encountered: