0.1.8: media_kit hot-restart guard (Linux, debug)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc16bba054
commit
d2435a06b2
7 files changed
+335
-224
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// Debug builds only: keeps a Flutter hot restart from crashing apps that use
|
||||
// media_kit on Linux. Hot restart frees the old isolate's NativeCallables
|
||||
// while mpv handles stay alive; media_kit then "quit"s the leftovers and mpv
|
||||
// calls a dead wakeup callback (SIGSEGV on mpv's "core" thread). On the
|
||||
// engine's on-pre-engine-restart signal this clears every live handle's
|
||||
// wakeup callback (found through media_kit's NativeReferenceHolder file).
|
||||
// Does nothing without media_kit/libmpv, and nothing in release builds.
|
||||
#ifndef FOX_UTILS_MEDIA_KIT_RESTART_GUARD_H_
|
||||
#define FOX_UTILS_MEDIA_KIT_RESTART_GUARD_H_
|
||||
|
||||
#include <flutter_linux/flutter_linux.h>
|
||||
|
||||
void media_kit_restart_guard_register_with_registrar(FlPluginRegistrar* registrar);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user