-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure "pause on uncaught" exceptions pauses in correct location. #1172
Conversation
@rwjblue can we wrap this entire try/finally in |
I think this is incorrect. The
I'd prefer not to duplicate the entire block for prod/debug (largely because we don't actually test prod), or do you mean to avoid the |
Another thing I just noticed, this updates the
It'd probably be enough to create a separate method which does the wrapping: execute() {
if (DEBUG) {
try {
this._execute();
} finally {
// ...
}
} else {
this._execute();
}
} This way we just avoid any funkiness with try/finally at all potentially. We could also verify that this new strategy does not deopt, it'll just take a while, and while I agree with your assessment, I don't actually understand why it was deopting in the first place still. None of the conditions should ever have been checked unless an error was thrown, and errors shouldn't occur at all in prod, yet it was still happening. We didn't see a major perf win from fixing this specific deopt in the end, so if you think it would make more sense to just not wrap in DEBUG and do this strategy I think it's probably fine. We'll have to rework this anyways if we want to ever actually handle errors during render. |
3bb7808
to
d72a617
Compare
Thanks for the pointers there! Just updated, mind taking another look? |
Prior to this change (since 90f948) when an error occured after initial append (during the updating VM lifetime) using the dev tools feature for "pause on uncaught exceptions" would **never** pause execution in userland code, it would always pause at the location that the `UpdatingVM` was re-throwing the error. This change restores the proper developer ergonomics of "pause on uncaught exceptions" while still preserving the original intent of the changes that were landed in this area for 90f948 (preventing invocation of `resetTracking` when "all is well").
d72a617
to
3269ca3
Compare
Fixes two major issues: * Ensure "pause on uncaught" exceptions pauses in correct location (glimmerjs/glimmer-vm#1172) * Log template heirarchy to the console for any errors thrown during rendering (glimmerjs/glimmer-vm#1169)
Fixes two major issues: * Ensure "pause on uncaught" exceptions pauses in correct location (glimmerjs/glimmer-vm#1172) * Log template heirarchy to the console for any errors thrown during rendering (glimmerjs/glimmer-vm#1169) (cherry picked from commit e8cfd08)
Fixes two major issues: * Ensure "pause on uncaught" exceptions pauses in correct location (glimmerjs/glimmer-vm#1172) * Log template heirarchy to the console for any errors thrown during rendering (glimmerjs/glimmer-vm#1169)
Prior to this change (since 90f948) when an error occured after initial append (during the updating VM lifetime) using the dev tools feature for "pause on uncaught exceptions" would never pause execution in userland code, it would always pause at the location that the
UpdatingVM
was re-throwing the error.This change restores the proper developer ergonomics of "pause on uncaught exceptions" while still preserving the original intent of the changes that were landed in this area for 90f948 (preventing invocation of
resetTracking
when "all is well").