mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Auto merge of #6131 - glennw:jquery-exit-fix, r=jdm
This fixes a hang found while testing the jQuery test suite. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6131) <!-- Reviewable:end -->
This commit is contained in:
commit
c51e9f0455
7 changed files with 74 additions and 21 deletions
|
@ -94,7 +94,13 @@ impl PaintListener for Box<CompositorProxy+'static+Send> {
|
|||
fn get_graphics_metadata(&mut self) -> Option<NativeGraphicsMetadata> {
|
||||
let (chan, port) = channel();
|
||||
self.send(Msg::GetGraphicsMetadata(chan));
|
||||
port.recv().unwrap()
|
||||
// If the compositor is shutting down when a paint task
|
||||
// is being created, the compositor won't respond to
|
||||
// this message, resulting in an eventual panic. Instead,
|
||||
// just return None in this case, since the paint task
|
||||
// will exit shortly and never actually be requested
|
||||
// to paint buffers by the compositor.
|
||||
port.recv().unwrap_or(None)
|
||||
}
|
||||
|
||||
fn assign_painted_buffers(&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue