mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
script: Unconditionally send exit message during pipeline shutdown (#36808)
If a `WebView` is dropped immediately after creating it, the exit pipeline message can arrive to the `ScriptThread` before the `Document` is created for the pipeline. If this happens, we should still send a message to the `Constellation` informing it that the pipeline is closed, otherwise it will never know that this has happened properly. Testing: This change includes a new unit test. Fixes: #36807. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
21df8b875b
commit
20f20a07f2
2 changed files with 23 additions and 10 deletions
|
@ -44,6 +44,18 @@ fn test_create_webview(servo_test: &ServoTest) -> Result<(), anyhow::Error> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn main() {
|
||||
run_api_tests!(test_create_webview);
|
||||
fn test_create_webview_and_immediately_drop_webview_before_shutdown(
|
||||
servo_test: &ServoTest,
|
||||
) -> Result<(), anyhow::Error> {
|
||||
WebViewBuilder::new(servo_test.servo()).build();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() {
|
||||
run_api_tests!(
|
||||
test_create_webview,
|
||||
// This test needs to be last, as it tests creating and dropping
|
||||
// a WebView right before shutdown.
|
||||
test_create_webview_and_immediately_drop_webview_before_shutdown
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue