Commit 6cb6f8ee authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[wasm] Load undefined value from the wasm instance

In export wrappers generated code, load the undefined value from the
wasm instance rather than from the isolate. With asynchronous
compilation, the isolate may not be available.

R=mstarzinger@chromium.org

Bug: v8:9554
Change-Id: Ic448bda82c2125fc9c9f8715bce26870308715d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1722556Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62946}
parent 9f3f2d5b
......@@ -5598,8 +5598,9 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder {
// Clear the ThreadInWasm flag.
BuildModifyThreadInWasmFlag(false);
Node* jsval = sig_->return_count() == 0 ? jsgraph()->UndefinedConstant()
: ToJS(rets[0], sig_->GetReturn());
Node* jsval = sig_->return_count() == 0
? BuildLoadUndefinedValueFromInstance()
: ToJS(rets[0], sig_->GetReturn());
Return(jsval);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment