mirror of
https://github.com/denoland/deno.git
synced 2024-12-02 17:01:14 -05:00
d523cc2abc
When an exception is thrown during the processing of streaming WebAssembly, `op_wasm_streaming_abort` is called. This op calls into V8, which synchronously rejects the promise and calls into the promise rejection handler, if applicable. But calling an op borrows the isolate's `JsRuntimeState` for the duration of the op, which means it is borrowed when V8 calls into `promise_reject_callback`, which tries to borrow it again, panicking. This change changes `op_wasm_streaming_abort` from an op to a binding (`Deno.core.abortWasmStreaming`). Although that binding must borrow the `JsRuntimeState` in order to access the `WasmStreamingResource` stored in the `OpTable`, it also takes ownership of that `WasmStreamingResource` instance, which means it can drop any borrows of the `JsRuntimeState` before calling into V8. |
||
---|---|---|
.. | ||
bench_tests.rs | ||
bundle_tests.rs | ||
cache_tests.rs | ||
compat_tests.rs | ||
compile_tests.rs | ||
coverage_tests.rs | ||
doc_tests.rs | ||
eval_tests.rs | ||
fmt_tests.rs | ||
info_tests.rs | ||
inspector_tests.rs | ||
install_tests.rs | ||
lint_tests.rs | ||
lsp_tests.rs | ||
mod.rs | ||
repl_tests.rs | ||
run_tests.rs | ||
task_tests.rs | ||
test_tests.rs | ||
upgrade_tests.rs | ||
vendor_tests.rs | ||
watcher_tests.rs | ||
worker_tests.rs |