aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ports/geckolib/glue.rs6
1 files changed, 6 insertions, 0 deletions
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
@@ -183,6 +183,12 @@ pub extern "C" fn Servo_Initialize(dummy_url_data: *mut URLExtraData) {
}
#[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
// reference to avoid use-after-free.