| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8f0793f commit 4088089
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -215,6 +215,7 @@ void MarkGarbageCollectionEnd(Isolate* isolate, | |||
| 215 | 215 | uv_async_t* async = new uv_async_t(); // coverity[leaked_storage] | |
| 216 | 216 | if (uv_async_init(env->event_loop(), async, PerformanceGCCallback)) | |
| 217 | 217 | return delete async; | |
| 218 | + uv_unref(reinterpret_cast<uv_handle_t*>(async)); | ||
| 218 | 219 | async->data = | |
| 219 | 220 | new PerformanceEntry::Data(env, "gc", "gc", | |
| 220 | 221 | performance_last_gc_start_mark_, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,4 +48,6 @@ const kinds = [ | |||
| 48 | 48 | })); | |
| 49 | 49 | obs.observe({ entryTypes: ['gc'] }); | |
| 50 | 50 | global.gc(); | |
| 51 | + // Keep the event loop alive to witness the GC async callback happen. | ||
| 52 | + setImmediate(() => setImmediate(() => 0)); | ||
| 51 | 53 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments