mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #18555 - bholley:isworkerthread, r=upsuper
Add a Servo_IsWorkerThread API https://bugzilla.mozilla.org/show_bug.cgi?id=1400435
This commit is contained in:
commit
b081db1885
2 changed files with 8 additions and 0 deletions
|
@ -2929,6 +2929,9 @@ extern "C" {
|
|||
extern "C" {
|
||||
pub fn Servo_AssertTreeIsClean(root: RawGeckoElementBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_IsWorkerThread() -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_MaybeGCRuleTree(set: RawServoStyleSetBorrowed);
|
||||
}
|
||||
|
|
|
@ -3483,6 +3483,11 @@ pub extern "C" fn Servo_AssertTreeIsClean(root: RawGeckoElementBorrowed) {
|
|||
assert_subtree_is_clean(root);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_IsWorkerThread() -> bool {
|
||||
thread_state::get().is_worker()
|
||||
}
|
||||
|
||||
enum Offset {
|
||||
Zero,
|
||||
One
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue