File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -283,8 +283,9 @@ IsolateWrap::IsolateWrap() {
283
283
284
284
threadManager_ = new ThreadManager ();
285
285
286
- // NOTE: check lock_gc_release(); is needed (and where)
287
- // lock_gc_release();
286
+ // The following ensures this instance is retained using PersistentHolder.
287
+ lock_gc_release ();
288
+
288
289
Memory::gcRegisterFinalizer (this , [](void * self) {
289
290
reinterpret_cast <IsolateWrap*>(self)->~IsolateWrap ();
290
291
});
@@ -320,8 +321,8 @@ IsolateWrap* IsolateWrap::New() {
320
321
void IsolateWrap::Dispose () {
321
322
LWNODE_CALL_TRACE_ID (ISOWRAP);
322
323
LWNODE_CALL_TRACE_GC_START ();
323
- // NOTE: check unlock_gc_release(); is needed (and where)
324
- // unlock_gc_release();
324
+
325
+ unlock_gc_release ();
325
326
326
327
global_handles ()->dispose ();
327
328
RegisteredExtension::unregisterAll ();
@@ -394,6 +395,7 @@ void IsolateWrap::Initialize(const v8::Isolate::CreateParams& params) {
394
395
// Do Nothing
395
396
LWNODE_CALL_TRACE_GC_START ();
396
397
// NOTE: Calls when vmInstance() is terminated. This happens before GC runs
398
+ LWNODE_DEV_LOG (" [OnVMInstanceDelete]" );
397
399
LWNODE_CALL_TRACE_GC_END ();
398
400
});
399
401
You can’t perform that action at this time.
0 commit comments