From bd9c17234c330e6a2f01fdc472a9dd81a0ea05c5 Mon Sep 17 00:00:00 2001 From: Samson <16504129+sagudev@users.noreply.github.com> Date: Tue, 3 Oct 2023 17:16:42 +0200 Subject: [PATCH] fix handle_wgpu_msg crash (#30479) * Enter realm before handle_wgpu_msg fix https://github.com/servo/servo/issues/30419 * Update expectations --- components/script/script_thread.rs | 1 + .../reftests/canvas_complex_rgba8unorm_store.https.html.ini | 2 +- .../web_platform/reftests/canvas_image_rendering.https.html.ini | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 4ded0c6632a..d25c58db0d8 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -2102,6 +2102,7 @@ impl ScriptThread { result, } => { let global = self.documents.borrow().find_global(pipeline_id).unwrap(); + let _ac = enter_realm(&*global); global.handle_wgpu_msg(device, scope_id, result); }, WebGPUMsg::CleanDevice { diff --git a/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_complex_rgba8unorm_store.https.html.ini b/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_complex_rgba8unorm_store.https.html.ini index eee89e4a407..59810e46f72 100644 --- a/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_complex_rgba8unorm_store.https.html.ini +++ b/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_complex_rgba8unorm_store.https.html.ini @@ -1,2 +1,2 @@ [canvas_complex_rgba8unorm_store.https.html] - expected: CRASH + expected: FAIL diff --git a/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_image_rendering.https.html.ini b/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_image_rendering.https.html.ini index 32bf52f0d76..b64101496ff 100644 --- a/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_image_rendering.https.html.ini +++ b/tests/wpt/webgpu/meta/webgpu/webgpu/web_platform/reftests/canvas_image_rendering.https.html.ini @@ -1,2 +1,2 @@ [canvas_image_rendering.https.html] - expected: CRASH + expected: TIMEOUT