diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index eda8d6f8b4c..21785498be6 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -182,6 +182,12 @@ pub extern "C" fn Servo_Initialize(dummy_url_data: *mut URLExtraData) { unsafe { DUMMY_URL_DATA = dummy_url_data; } } +#[no_mangle] +pub extern "C" fn Servo_InitializeCooperativeThread() { + // Pretend that we're a Servo Layout thread to make some assertions happy. + thread_state::initialize(thread_state::LAYOUT); +} + #[no_mangle] pub extern "C" fn Servo_Shutdown() { // The dummy url will be released after shutdown, so clear the