mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Propagate CanGc
from Document::new()
(#33386)
* Add canGc as a parameter to autogenerated trait methods Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> * Propagate CanGc from Document::new() Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com> --------- Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
This commit is contained in:
parent
10e5bb72d9
commit
e5150dbda1
41 changed files with 704 additions and 393 deletions
|
@ -13,7 +13,7 @@ use crate::dom::globalscope::GlobalScope;
|
|||
use crate::dom::worker::TrustedWorkerAddress;
|
||||
use crate::dom::workerglobalscope::WorkerGlobalScope;
|
||||
use crate::realms::enter_realm;
|
||||
use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
|
||||
use crate::script_runtime::{CanGc, CommonScriptMsg, ScriptChan, ScriptPort};
|
||||
use crate::task_queue::{QueuedTaskConversion, TaskQueue};
|
||||
|
||||
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
|
||||
|
@ -101,6 +101,7 @@ pub trait WorkerEventLoopMethods {
|
|||
pub fn run_worker_event_loop<T, WorkerMsg, Event>(
|
||||
worker_scope: &T,
|
||||
worker: Option<&TrustedWorkerAddress>,
|
||||
_can_gc: CanGc,
|
||||
) where
|
||||
WorkerMsg: QueuedTaskConversion + Send,
|
||||
T: WorkerEventLoopMethods<WorkerMsg = WorkerMsg, Event = Event>
|
||||
|
@ -155,7 +156,7 @@ pub fn run_worker_event_loop<T, WorkerMsg, Event>(
|
|||
};
|
||||
worker_scope
|
||||
.upcast::<GlobalScope>()
|
||||
.perform_a_microtask_checkpoint();
|
||||
.perform_a_microtask_checkpoint(CanGc::note());
|
||||
}
|
||||
worker_scope
|
||||
.upcast::<GlobalScope>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue