aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlscriptelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-13 10:18:15 -0700
committerGitHub <noreply@github.com>2016-07-13 10:18:15 -0700
commit3011d4b450b107f87fab54f6c59245ac1478fa79 (patch)
treea8d303bb68a8b3adbef7eb7ddb3e54cde0c329a0 /components/script/dom/htmlscriptelement.rs
parent2df5d705e13f78afc8ceeb1b5333fc886e2691fa (diff)
parent862dc006818d09acf3af5c340635181f47e6fb2c (diff)
downloadservo-3011d4b450b107f87fab54f6c59245ac1478fa79.tar.gz
servo-3011d4b450b107f87fab54f6c59245ac1478fa79.zip
Auto merge of #12404 - ConnorGBrewster:task_source_cleanup, r=asajeffrey
Clean up task sources and make all tasks cancellable <!-- Please describe your changes on the following line: --> This makes it so each task is a thin wrapper over a runnable and whenever a task is queued, it is automatically wrapped by the window's `runnable_wrapper`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11703 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12404) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r--components/script/dom/htmlscriptelement.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index 2d10e5f43d8..5195b0e53a6 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -460,12 +460,13 @@ impl HTMLScriptElement {
if external {
self.dispatch_load_event();
} else {
- window.dom_manipulation_task_source().queue_simple_event(self.upcast(), atom!("load"));
+ window.dom_manipulation_task_source().queue_simple_event(self.upcast(), atom!("load"), window.r());
}
}
pub fn queue_error_event(&self) {
- window_from_node(self).dom_manipulation_task_source().queue_simple_event(self.upcast(), atom!("error"));
+ let window = window_from_node(self);
+ window.dom_manipulation_task_source().queue_simple_event(self.upcast(), atom!("error"), window.r());
}
pub fn dispatch_before_script_execute_event(&self) -> bool {