mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Drop webgl main thread data during shutdown.
This commit is contained in:
parent
447ae1eae6
commit
25b20ebfc6
1 changed files with 8 additions and 6 deletions
|
@ -112,12 +112,14 @@ impl WebGLMainThread {
|
||||||
|
|
||||||
// Any context could be current when we start.
|
// Any context could be current when we start.
|
||||||
self.thread_data.borrow_mut().bound_context_id = None;
|
self.thread_data.borrow_mut().bound_context_id = None;
|
||||||
self.shut_down.set(
|
let result = self
|
||||||
!self
|
.thread_data
|
||||||
.thread_data
|
.borrow_mut()
|
||||||
.borrow_mut()
|
.process(EventLoop::Nonblocking);
|
||||||
.process(EventLoop::Nonblocking),
|
if !result {
|
||||||
);
|
self.shut_down.set(true);
|
||||||
|
WEBGL_MAIN_THREAD.with(|thread_data| thread_data.borrow_mut().take());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the main GL thread if called from the main thread,
|
/// Returns the main GL thread if called from the main thread,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue