mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
let mark_document_with_no_blocked_loads() take a None value silently
This commit is contained in:
parent
d6b3eb6db9
commit
c713febe7a
1 changed files with 7 additions and 5 deletions
|
@ -809,11 +809,13 @@ impl ScriptThread {
|
|||
|
||||
pub fn mark_document_with_no_blocked_loads(doc: &Document) {
|
||||
SCRIPT_THREAD_ROOT.with(|root| {
|
||||
let script_thread = unsafe { &*root.get().unwrap() };
|
||||
script_thread
|
||||
.docs_with_no_blocking_loads
|
||||
.borrow_mut()
|
||||
.insert(Dom::from_ref(doc));
|
||||
unsafe {
|
||||
if let Some(script_thread) = root.get() {
|
||||
(*script_thread)
|
||||
.docs_with_no_blocking_loads
|
||||
.borrow_mut()
|
||||
.insert(Dom::from_ref(doc));
|
||||
}}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue