File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -33,22 +33,14 @@ class ScopedCounter {
33
33
~ScopedCounter () { Decrement (); }
34
34
private:
35
35
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 --; }
46
37
};
47
38
48
39
void RegisterCheckScopesAtExit () {
49
40
atexit ([](){
50
41
// Check we don't exit before the tests are done.
51
42
// (Make sure there's a keepalive for everything the test has scopes for.)
43
+ // Build with -sEXIT_RUNTIME to trace keepalives.
52
44
assert (sScopeCount == 0 );
53
45
// Overwrite the old return code and exit now that everything is done.
54
46
exit (0 );
You can’t perform that action at this time.
0 commit comments