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
|
@ -45,7 +45,7 @@ use crate::dom::workerglobalscope::WorkerGlobalScope;
|
|||
use crate::fetch::load_whole_resource;
|
||||
use crate::realms::{enter_realm, AlreadyInRealm, InRealm};
|
||||
use crate::script_runtime::{
|
||||
new_rt_and_cx, CommonScriptMsg, ContextForRequestInterrupt, JSContext as SafeJSContext,
|
||||
new_rt_and_cx, CanGc, CommonScriptMsg, ContextForRequestInterrupt, JSContext as SafeJSContext,
|
||||
Runtime, ScriptChan,
|
||||
};
|
||||
use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
|
||||
|
@ -295,6 +295,7 @@ impl ServiceWorkerGlobalScope {
|
|||
control_receiver: Receiver<ServiceWorkerControlMsg>,
|
||||
context_sender: Sender<ContextForRequestInterrupt>,
|
||||
closing: Arc<AtomicBool>,
|
||||
_can_gc: CanGc,
|
||||
) -> JoinHandle<()> {
|
||||
let ScopeThings {
|
||||
script_url,
|
||||
|
@ -398,7 +399,7 @@ impl ServiceWorkerGlobalScope {
|
|||
// which happens after the closing flag is set to true,
|
||||
// or until the worker has run beyond its allocated time.
|
||||
while !scope.is_closing() && !global.has_timed_out() {
|
||||
run_worker_event_loop(&*global, None);
|
||||
run_worker_event_loop(&*global, None, CanGc::note());
|
||||
}
|
||||
},
|
||||
reporter_name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue