Bug 1398393 - Add a way to initialize a cooperative thread in servo.

This commit is contained in:
Blake Kaplan 2017-09-19 16:30:41 -07:00
parent c6381c66a0
commit 37879260a9

View file

@ -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