| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,11 @@ const { | |||
| 12 | 12 | CppGCed, states, kDestructCount, kTraceCount, | |
| 13 | 13 | } = require(`./build/${common.buildType}/binding`); | |
| 14 | 14 | ||
| 15 | + const GC_OPTIONS = { | ||
| 16 | + type: 'major', | ||
| 17 | + execution: 'sync', | ||
| 18 | + }; | ||
| 19 | + | ||
| 15 | 20 | assert.strictEqual(states[kDestructCount], 0); | |
| 16 | 21 | assert.strictEqual(states[kTraceCount], 0); | |
| 17 | 22 | ||
@@ -38,6 +43,8 @@ setTimeout(common.mustCall(() => (async function() { | |||
| 38 | 43 | await gcUntil( | |
| 39 | 44 | 'All old CppGCed are destroyed', | |
| 40 | 45 | () => states[kDestructCount] === count, | |
| 46 | + undefined, | ||
| 47 | + GC_OPTIONS, | ||
| 41 | 48 | ); | |
| 42 | 49 | // Release all the CppGCed objects, after GC we should have destructed | |
| 43 | 50 | // all of them. | |
@@ -47,5 +54,7 @@ setTimeout(common.mustCall(() => (async function() { | |||
| 47 | 54 | await gcUntil( | |
| 48 | 55 | 'All old CppGCed are destroyed', | |
| 49 | 56 | () => states[kDestructCount] === count * 2, | |
| 57 | + undefined, | ||
| 58 | + GC_OPTIONS, | ||
| 50 | 59 | ); | |
| 51 | 60 | })().then(common.mustCall())), 1); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments