aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_runtime.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-10-05 10:24:21 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 21:35:59 +0200
commitc66cf46bee6306ba8cb51f22c0d704c31c17d0fd (patch)
tree6aac14a7c2cfd53f62e7e6b9e137569e70749ad3 /components/script/script_runtime.rs
parent996fd284e29c0406b185a429e7e5cd40405bee35 (diff)
downloadservo-c66cf46bee6306ba8cb51f22c0d704c31c17d0fd.tar.gz
servo-c66cf46bee6306ba8cb51f22c0d704c31c17d0fd.zip
Make the closure in flush_promise_jobs return a Root<GlobalScope>
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r--components/script/script_runtime.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index 145ef1ef19e..c1da1104cd4 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -8,8 +8,8 @@
use dom::bindings::callback::ExceptionHandling;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::PromiseBinding::PromiseJobCallback;
-use dom::bindings::global::{GlobalRoot, global_scope_from_object};
-use dom::bindings::js::{RootCollection, RootCollectionPtr, trace_roots};
+use dom::bindings::global::global_scope_from_object;
+use dom::bindings::js::{Root, RootCollection, RootCollectionPtr, trace_roots};
use dom::bindings::refcounted::{LiveDOMReferences, trace_refcounted_objects};
use dom::bindings::trace::trace_traceables;
use dom::bindings::utils::DOM_CALLBACKS;
@@ -150,7 +150,7 @@ impl PromiseJobQueue {
/// Perform a microtask checkpoint, by invoking all of the pending promise job callbacks in
/// FIFO order (#4283).
pub fn flush_promise_jobs<F>(&self, target_provider: F)
- where F: Fn(PipelineId) -> Option<GlobalRoot>
+ where F: Fn(PipelineId) -> Option<Root<GlobalScope>>
{
self.pending_promise_job_runnable.set(false);
{
@@ -162,7 +162,7 @@ impl PromiseJobQueue {
// `flushing_queue` is a static snapshot during this checkpoint.
for job in &*self.flushing_job_queue.borrow() {
if let Some(target) = target_provider(job.pipeline) {
- let _ = job.callback.Call_(&target.r(), ExceptionHandling::Report);
+ let _ = job.callback.Call_(&*target, ExceptionHandling::Report);
}
}
self.flushing_job_queue.borrow_mut().clear();