mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix a webdriver timeout during server start up
When sending a webdriver load URL command soon enough after starting Servo, that command could time out with a logged warning: ``` constellation: Webdriver load for closed browsing context (0,2). ``` When `closed` in this case really meant not opened yet.
This commit is contained in:
parent
4acdb81197
commit
48f6e168d4
1 changed files with 6 additions and 1 deletions
|
@ -931,7 +931,12 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
FromCompositorMsg::GetFocusTopLevelBrowsingContext(resp_chan) => {
|
||||
let focus_browsing_context = self.focus_pipeline_id
|
||||
.and_then(|pipeline_id| self.pipelines.get(&pipeline_id))
|
||||
.map(|pipeline| pipeline.top_level_browsing_context_id);
|
||||
.map(|pipeline| pipeline.top_level_browsing_context_id)
|
||||
.filter(|&top_level_browsing_context_id| {
|
||||
let browsing_context_id =
|
||||
BrowsingContextId::from(top_level_browsing_context_id);
|
||||
self.browsing_contexts.contains_key(&browsing_context_id)
|
||||
});
|
||||
let _ = resp_chan.send(focus_browsing_context);
|
||||
}
|
||||
FromCompositorMsg::KeyEvent(ch, key, state, modifiers) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue