mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Bug 1398393 - Add a way to initialize a cooperative thread in servo.
This commit is contained in:
parent
c6381c66a0
commit
37879260a9
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue