mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Delay setting the constellation's active browser id until the context exists.
This commit is contained in:
parent
db786a4399
commit
b62a1ca662
1 changed files with 6 additions and 7 deletions
|
@ -4034,17 +4034,16 @@ where
|
|||
|
||||
/// Send the current frame tree to compositor
|
||||
fn send_frame_tree(&mut self, top_level_browsing_context_id: TopLevelBrowsingContextId) {
|
||||
self.active_browser_id = Some(top_level_browsing_context_id);
|
||||
let browsing_context_id = BrowsingContextId::from(top_level_browsing_context_id);
|
||||
|
||||
// Note that this function can panic, due to ipc-channel creation failure.
|
||||
// avoiding this panic would require a mechanism for dealing
|
||||
// with low-resource scenarios.
|
||||
debug!(
|
||||
"Sending frame tree for browsing context {}.",
|
||||
browsing_context_id
|
||||
);
|
||||
let browsing_context_id = BrowsingContextId::from(top_level_browsing_context_id);
|
||||
if let Some(frame_tree) = self.browsing_context_to_sendable(browsing_context_id) {
|
||||
debug!(
|
||||
"Sending frame tree for browsing context {}.",
|
||||
browsing_context_id
|
||||
);
|
||||
self.active_browser_id = Some(top_level_browsing_context_id);
|
||||
self.compositor_proxy
|
||||
.send(ToCompositorMsg::SetFrameTree(frame_tree));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue