Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: sky/shell/ui/animator.cc

Issue 952273003: Make WebView::close not crash and start to fix navigation in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fixed Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/shell/ui/animator.h ('k') | sky/shell/ui/engine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/ui/animator.cc
diff --git a/sky/shell/ui/animator.cc b/sky/shell/ui/animator.cc
index e7f299b97c99012a5404526bb52bdf3233ff049d..0833259c65d5740b58d9ad1105a20381aa484637 100644
--- a/sky/shell/ui/animator.cc
+++ b/sky/shell/ui/animator.cc
@@ -34,9 +34,17 @@ void Animator::RequestFrame() {
}
}
+void Animator::CancelFrameRequest() {
+ engine_requested_frame_ = false;
+}
+
void Animator::BeginFrame() {
DCHECK(frame_in_progress_);
- DCHECK(engine_requested_frame_);
+ // There could be a request in the message loop at time of cancel.
+ if (!engine_requested_frame_) {
+ frame_in_progress_ = false;
+ return;
+ }
engine_requested_frame_ = false;
engine_->BeginFrame(base::TimeTicks::Now());
« no previous file with comments | « sky/shell/ui/animator.h ('k') | sky/shell/ui/engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698