mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: call UnregisterIsolate consistently (#28554)
* fix: call `UnregisterIsolate` consistently `JavascriptEnvironment` is the class that calls `RegisterIsolate()` so it should be the one to call `UnregisterIsolate`, and this can happen right before disposing the aforementioned `isolate`. See: https://github.com/electron/electron/pull/28468 * fix Co-authored-by: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
@@ -279,10 +279,6 @@ int NodeMain(int argc, char* argv[]) {
|
||||
node::Stop(env);
|
||||
node::FreeEnvironment(env);
|
||||
node::FreeIsolateData(isolate_data);
|
||||
|
||||
gin_env.platform()->DrainTasks(isolate);
|
||||
gin_env.platform()->CancelPendingDelayedTasks(isolate);
|
||||
gin_env.platform()->UnregisterIsolate(isolate);
|
||||
}
|
||||
|
||||
// According to "src/gin/shell/gin_main.cc":
|
||||
|
||||
Reference in New Issue
Block a user