Suspend and Switch were throwing suspenderror exceptions. CHanged to trapping.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks! Looks good so far, but the change is incomplete so I don't think we should land it as is. See comments below.
__ TrapIf(is_on_central_stack, TrapId::kTrapSuspend);This only handles a particular case: when we are currently on the central stack.
The more general case is that we can't have any central stack frames in the captured stack chain. This is handled separately in the C call, which returns null instead of the target stack if the suspend/switch is invalid. Then the builtin handles it by throwing a SuspendError.
So we also need to change the builtins to trap instead of throw.
WebAssembly.SuspendError, /WasmFX: unhandled suspend/);See here and 4 lines below, we still throw a `SuspendError` instead of trapping because this is the more general case.
Same with the `SuspendError` test in `stack-switching-switch.js`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Am abandoning this CL. I will be creating a new one with under my google.com email.
And I will reflect the comments.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
We should trap (throw a runtime error) instead throwing a regular exception.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thibaud Michaud abandoned this change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM with a nit
#include "src/codegen/interface-descriptors.h"I don't think this include is needed, at least not for this change's delta.
If it is, please move it behind the #if guard with the other includes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I don't think this include is needed, at least not for this change's delta.
If it is, please move it behind the #if guard with the other includes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |