Retain a reference to the CFRunLoop until MessageLoopDarwin::Terminate exits (flutter/engine#34735)
This commit is contained in:
@@ -63,7 +63,12 @@ void MessageLoopDarwin::Run() {
|
|||||||
|
|
||||||
void MessageLoopDarwin::Terminate() {
|
void MessageLoopDarwin::Terminate() {
|
||||||
running_ = false;
|
running_ = false;
|
||||||
CFRunLoopStop(loop_);
|
|
||||||
|
// Ensure that the CFRunLoop remains alive through the end of this function
|
||||||
|
// even if the loop's thread exits and drops its reference to the loop.
|
||||||
|
CFRef<CFRunLoopRef> local_loop(loop_);
|
||||||
|
|
||||||
|
CFRunLoopStop(local_loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessageLoopDarwin::WakeUp(fml::TimePoint time_point) {
|
void MessageLoopDarwin::WakeUp(fml::TimePoint time_point) {
|
||||||
|
|||||||
Reference in New Issue
Block a user