Skip to content

Commit b3c5761

Browse files
committed
Remove flaky check for keepRuntimeAlive (emscripten_set_main_loop doesn't release until after the callback)
1 parent e070e8e commit b3c5761

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

test/webgpu_basic_rendering.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,14 @@ class ScopedCounter {
3333
~ScopedCounter() { Decrement(); }
3434
private:
3535
void Increment() { sScopeCount++; }
36-
void Decrement() {
37-
assert(sScopeCount > 0);
38-
sScopeCount--;
39-
if (sScopeCount == 0) {
40-
// Check we don't reach 0 before the runtime is ready to exit.
41-
// (Make sure this test has scopes for everything that does keepalive.)
42-
bool runtime_is_kept_alive = EM_ASM_INT({ return keepRuntimeAlive(); });
43-
assert(!runtime_is_kept_alive);
44-
}
45-
}
36+
void Decrement() { assert(sScopeCount > 0); sScopeCount--; }
4637
};
4738

4839
void RegisterCheckScopesAtExit() {
4940
atexit([](){
5041
// Check we don't exit before the tests are done.
5142
// (Make sure there's a keepalive for everything the test has scopes for.)
43+
// Build with -sEXIT_RUNTIME to trace keepalives.
5244
assert(sScopeCount == 0);
5345
// Overwrite the old return code and exit now that everything is done.
5446
exit(0);

0 commit comments

Comments
 (0)