Check for destroyed TNSRuntime and handle gracefully in dealloc. Sometimes
native objects having JS counterparts could live longer than their respective TNSRuntimes
(e.g. JS callbacks that have been subscribed for events from NSNotificationCenter)
Add RELEASE_ASSERTs for alive TNSRuntime in all places in the code where
this is expected.
Allow creation of an ObjCWrapperObject without an alive TNSRuntime. This
is needed when the native object needs to be accessed from another VM (e.g.
accessing the handler to destroy it from the main (notifications producer) thread
when the worker has already exited)
[webkit] Guard against destroyed and nullptr VM's in locking primitives
Keep VM alive as long as there are objects referring it
Add strong references to VM from blocks and native adapters for JS objects
Invoke C++ destructor in disposeBlock instead of the explicit clearing its
member(s)
Keep worker thread alive as long as the VM is in use
[x] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
Check for destroyed
TNSRuntime
and handle gracefully indealloc
. Sometimes native objects having JS counterparts could live longer than their respectiveTNSRuntimes
(e.g. JS callbacks that have been subscribed for events fromNSNotificationCenter
)Add
RELEASE_ASSERT
s for aliveTNSRuntime
in all places in the code where this is expected.Allow creation of an
ObjCWrapperObject
without an aliveTNSRuntime
. This is needed when the native object needs to be accessed from another VM (e.g. accessing the handler to destroy it from the main (notifications producer) thread when the worker has already exited)[webkit] Guard against destroyed and
nullptr
VM's in locking primitivesKeep VM alive as long as there are objects referring it
Add strong references to VM from blocks and native adapters for JS objects
Invoke C++ destructor in
disposeBlock
instead of the explicit clearing its member(s)Keep worker thread alive as long as the VM is in use
Add tests for crashes and leaked runtimes
PR Checklist
refs #1163