[wasm] Refactor and fix ErrorThrower
The error thrower did allocate the exception at the moment the error was detected. For async compilation, this meant in another step than when it was actually thrown. Since the HandleScope of the exception already died at that point, this would have lead to memory errors. With this refactoring, we only store the information needed to generate the exception in the ErrorThrower, and only generate the exception object once it is actually needed. With regression test. R=ahaas@chromium.org, mtrofin@chromium.org Also-by: ahaas@chromium.org Change-Id: Iffcab1f8d1cf5925e3643fcf0729ba9a84c7d277 Reviewed-on: https://chromium-review.googlesource.com/490085 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Mircea Trofin <mtrofin@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#45000}
Showing
Please
register
or
sign in
to comment