mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix shutdown
This commit is contained in:
parent
449881f566
commit
c6a2f6eb05
3 changed files with 7 additions and 4 deletions
|
@ -40,7 +40,7 @@ void BrowserPage::Shutdown() {
|
|||
log("Waiting for Servo to shutdown");
|
||||
::WaitForSingleObject(hEvent, INFINITE);
|
||||
StopRenderLoop();
|
||||
mServo.reset(); // will call servo::deinit
|
||||
mServo.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -168,6 +168,7 @@ void BrowserPage::Loop(cancellation_token cancel) {
|
|||
mServo->PerformUpdates();
|
||||
}
|
||||
log("Leaving loop");
|
||||
mServo->DeInit();
|
||||
cancel_current_task();
|
||||
} // namespace winrt::ServoApp::implementation
|
||||
|
||||
|
@ -188,6 +189,7 @@ void BrowserPage::StartRenderLoop() {
|
|||
void BrowserPage::StopRenderLoop() {
|
||||
if (IsLoopRunning()) {
|
||||
mLoopCancel.cancel();
|
||||
WakeUp();
|
||||
mLoopTask->wait();
|
||||
mLoopTask.reset();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue