| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d202c05 commit aded597
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -212,13 +212,14 @@ void MarkGarbageCollectionEnd(Isolate* isolate, | |||
| 212 | 212 | v8::GCCallbackFlags flags, | |
| 213 | 213 | void* data) { | |
| 214 | 214 | Environment* env = static_cast<Environment*>(data); | |
| 215 | - uv_async_t *async = new uv_async_t; | ||
| 215 | + uv_async_t* async = new uv_async_t(); // coverity[leaked_storage] | ||
| 216 | + if (uv_async_init(env->event_loop(), async, PerformanceGCCallback)) | ||
| 217 | + return delete async; | ||
| 216 | 218 | async->data = | |
| 217 | 219 | new PerformanceEntry::Data(env, "gc", "gc", | |
| 218 | 220 | performance_last_gc_start_mark_, | |
| 219 | 221 | PERFORMANCE_NOW(), type); | |
| 220 | - uv_async_init(env->event_loop(), async, PerformanceGCCallback); | ||
| 221 | - uv_async_send(async); | ||
| 222 | + CHECK_EQ(0, uv_async_send(async)); | ||
| 222 | 223 | } | |
| 223 | 224 | ||
| 224 | 225 | inline void SetupGarbageCollectionTracking(Environment* env) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments