servo: Merge #14762 - Error handled canvas closing (from prampey:error-handle); r=jdm

<!-- Please describe your changes on the following line: -->
Correctly handled error when Canvas doesn't close properly, with a descriptive warning.

---
<!-- 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 #14002  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because minor changes don't require tests.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: c6ea1ec91f4a0b79b4fcdfa05a9b492fa6c9a798
This commit is contained in:
Prudhvi Rampey 2016-12-28 13:49:02 -08:00
Родитель 15835c76a2
Коммит 5952b8fef9
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -1319,7 +1319,9 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D {
impl Drop for CanvasRenderingContext2D {
fn drop(&mut self) {
self.ipc_renderer.send(CanvasMsg::Common(CanvasCommonMsg::Close)).unwrap();
if let Err(err) = self.ipc_renderer.send(CanvasMsg::Common(CanvasCommonMsg::Close)) {
warn!("Could not close canvas: {}", err)
}
}
}