mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Mark the Gecko main thread as a Servo layout thread.
This is needed to keep the assertion in the RuleTree GC functions that checks we're being called on the non-worker layout thread.
This commit is contained in:
parent
48aa7070ac
commit
226c946817
1 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,7 @@ use style::selector_parser::PseudoElementCascadeType;
|
|||
use style::sequential;
|
||||
use style::string_cache::Atom;
|
||||
use style::stylesheets::{Origin, Stylesheet};
|
||||
use style::thread_state;
|
||||
use style::timer::Timer;
|
||||
use style_traits::ToCss;
|
||||
|
||||
|
@ -66,6 +67,9 @@ pub extern "C" fn Servo_Initialize() -> () {
|
|||
|
||||
// Allocate our default computed values.
|
||||
unsafe { ComputedValues::initialize(); }
|
||||
|
||||
// Pretend that we're a Servo Layout thread, to make some assertions happy.
|
||||
thread_state::initialize(thread_state::LAYOUT);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue