aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-12-16 11:35:40 -0600
committerGitHub <noreply@github.com>2017-12-16 11:35:40 -0600
commitc9e3fabdfd0d4c900e83a1050ec465303e339681 (patch)
tree1b37b8a8e3d516d0960ff8d57a1133e960117858 /components/script/dom
parenta31fd24ce93f3a8bde1b56e01109ee3b94532e0d (diff)
parenta504c9358b70fcf02bd8f2067fcbd17d16c89439 (diff)
downloadservo-c9e3fabdfd0d4c900e83a1050ec465303e339681.tar.gz
servo-c9e3fabdfd0d4c900e83a1050ec465303e339681.zip
Auto merge of #19547 - tigercosmos:b1, r=jdm
Send IPC receiver for canvas as part of CreateCanvasPaintThread message <!-- Please describe your changes on the following line: --> I am not sure if @jdm want this. r? @jdm --- <!-- 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 #19483(github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/19547) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/canvasrenderingcontext2d.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs
index 93d4981d2bb..1c9dc16c445 100644
--- a/components/script/dom/canvasrenderingcontext2d.rs
+++ b/components/script/dom/canvasrenderingcontext2d.rs
@@ -129,11 +129,10 @@ impl CanvasRenderingContext2D {
size: Size2D<i32>)
-> CanvasRenderingContext2D {
debug!("Creating new canvas rendering context.");
- let (sender, receiver) = ipc::channel().unwrap();
+ let (ipc_renderer, receiver) = ipc::channel::<CanvasMsg>().unwrap();
let script_to_constellation_chan = global.script_to_constellation_chan();
debug!("Asking constellation to create new canvas thread.");
- script_to_constellation_chan.send(ScriptMsg::CreateCanvasPaintThread(size, sender)).unwrap();
- let ipc_renderer = receiver.recv().unwrap();
+ script_to_constellation_chan.send(ScriptMsg::CreateCanvasPaintThread(size, receiver)).unwrap();
debug!("Done.");
CanvasRenderingContext2D {
reflector_: Reflector::new(),