This must be avoided because Reference calls napi_delete_reference(), which in turn calls Reset() on the persistent stored inside, which ends up crashing because it runs from the library destructor, which in turn runs after the Isolate has already been disposed of.
See the source.
This must be avoided because
Referencecallsnapi_delete_reference(), which in turn callsReset()on the persistent stored inside, which ends up crashing because it runs from the library destructor, which in turn runs after theIsolatehas already been disposed of.See the source.