Commit 31712717 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm][gc] Check assumption on foreground task

If the gc foreground task is running, we don't expect any wasm code to
be live on the stack.
This CL adds a SLOW_DCHECK for this assumption.

R=mstarzinger@chromium.org

Bug: v8:8217
Change-Id: I0c221f6acaebd8c622d0f55ff85f69105482942f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1609541Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61449}
parent 98a16f45
......@@ -98,6 +98,11 @@ class WasmGCForegroundTask : public Task {
WasmEngine* engine = isolate_->wasm_engine();
// If the foreground task is executing, there is no wasm code active. Just
// report an empty set of live wasm code.
#ifdef ENABLE_SLOW_DCHECKS
for (StackFrameIterator it(isolate_); !it.done(); it.Advance()) {
DCHECK_NE(StackFrame::WASM_COMPILED, it.frame()->type());
}
#endif
engine->ReportLiveCodeForGC(isolate_, Vector<WasmCode*>{});
}
......
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