| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a0df91c commit cc1cd2b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -273,10 +273,11 @@ class NODE_EXTERN MultiIsolatePlatform : public v8::Platform { | |||
| 273 | 273 | // This function may only be called once per `Isolate`. | |
| 274 | 274 | virtual void RegisterIsolate(v8::Isolate* isolate, | |
| 275 | 275 | struct uv_loop_s* loop) = 0; | |
| 276 | - // This needs to be called right before calling `Isolate::Dispose()`. | ||
| 276 | + | ||
| 277 | 277 | // This function may only be called once per `Isolate`, and discard any | |
| 278 | 278 | // pending delayed tasks scheduled for that isolate. | |
| 279 | 279 | virtual void UnregisterIsolate(v8::Isolate* isolate) = 0; | |
| 280 | + | ||
| 280 | 281 | // The platform should call the passed function once all state associated | |
| 281 | 282 | // with the given isolate has been cleaned up. This can, but does not have to, | |
| 282 | 283 | // happen asynchronously. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -155,9 +155,9 @@ class WorkerThreadData { | |||
| 155 | 155 | w_->platform_->AddIsolateFinishedCallback(isolate, [](void* data) { | |
| 156 | 156 | *static_cast<bool*>(data) = true; | |
| 157 | 157 | }, &platform_finished); | |
| 158 | - w_->platform_->UnregisterIsolate(isolate); | ||
| 159 | 158 | ||
| 160 | 159 | isolate->Dispose(); | |
| 160 | + w_->platform_->UnregisterIsolate(isolate); | ||
| 161 | 161 | ||
| 162 | 162 | // Wait until the platform has cleaned up all relevant resources. | |
| 163 | 163 | while (!platform_finished) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments