[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/+/1609541
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61449}
This commit is contained in:
Clemens Hammacher 2019-05-13 15:35:17 +02:00 committed by Commit Bot
parent 98a16f4594
commit 317127179f

View File

@ -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*>{});
}