From b0ea9ac245080ef511f48ebd311aaf79acaf042e Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Thu, 23 Oct 2014 16:54:21 -0700 Subject: [PATCH] Fix border parsing to work again I accidentally broke border parsing when removing CSS color keyword hacks. While debugging this I also ran into a race condition in the debugger, which is fixed here. Add --gdb argument to skydb Makes it trivial to drop into gdb having launched mojo_shell/sky with the right arguments. R=ojan@chromium.org Review URL: https://codereview.chromium.org/673073002 --- engine/src/flutter/tools/debugger/debugger.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/tools/debugger/debugger.cc b/engine/src/flutter/tools/debugger/debugger.cc index 29bae26af7..52d00447db 100644 --- a/engine/src/flutter/tools/debugger/debugger.cc +++ b/engine/src/flutter/tools/debugger/debugger.cc @@ -70,6 +70,9 @@ class SkyDebugger : public mojo::ApplicationDelegate, window_manager_app_->InitFocus( new FocusRules(window_manager_app_.get(), content_)); + + if (!pending_url_.empty()) + NavigateToURL(pending_url_); } virtual void OnViewManagerDisconnected( @@ -98,7 +101,13 @@ class SkyDebugger : public mojo::ApplicationDelegate, // Overridden from Debugger virtual void NavigateToURL(const mojo::String& url) override { - content_->Embed(url); + // We can get Navigate commands before we've actually been + // embedded into the view and content_ created. + // Just save the last one. + if (content_) + content_->Embed(url); + else + pending_url_ = url; } scoped_ptr window_manager_app_; @@ -106,6 +115,7 @@ class SkyDebugger : public mojo::ApplicationDelegate, mojo::ViewManager* view_manager_; mojo::View* root_; mojo::View* content_; + std::string pending_url_; DISALLOW_COPY_AND_ASSIGN(SkyDebugger); };