Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWebGL Rendering Context - Fixed unnecessary unwrap calls for every send #16050
Conversation
highfive
commented
Mar 20, 2017
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @metajack (or someone else) soon. |
highfive
commented
Mar 20, 2017
highfive
commented
Mar 20, 2017
|
@bors-servo: try |
WebGL Rendering Context - Fixed unnecessary unwrap calls for every send <!-- Please describe your changes on the following line: --> * replaced unwrap() calls every send to ipc_renderer with if .. is_err() * if error occurs, added a warning - "WebRenderer is unavailable!" * functions will immediately return after the 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 #16021 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because _____ I think they don't require additional tests because they're just meant to reduce possible thread panics if WebRenderer is not available for some reason. <!-- 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/16050) <!-- Reviewable:end -->
|
The semantic change here is that previously these unwraps would panic if there was an error, but now we simply warn. Probably @glennw should weigh in on whether panics are appropriate or if we can relax them to warnings. |
|
Don't we want Servo to be able to continue displaying the page even if something goes wrong in the WebGL rendering thread? |
|
We do, but if the end result of this is that the renderer never recovers, it's not really much of an improvement. I haven't gone to look, but that part is already there, then the panics would indeed be unnecessary. |
|
|
|
Well I guess if there are functions in which an error results in the renderer not being able to recover, we could panic!() instead of return in them. |
|
@bors-servo try- |
|
@bors-servo r- try- clean |
sviter
commented
Oct 5, 2017
|
What is the status of this PR? |
|
It sounds like this change is not desired until we support recreating a failed renderer, unfortunately. |
mrkajetanp commentedMar 20, 2017
•
edited by larsbergstrom
WebGL Rendering Context
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsI think they don't require additional tests because they're just meant to reduce possible thread panics if WebRenderer is not available for some reason.
This change is