Add checks in ScheduleAnimation to help understand crash

The WebFrameWidget always has a client while the WebLocalFrameImpl
points to the WebFrameWidget. So let's try fish out what assumptions
are wrong.

[email protected]

Bug: 939262
Change-Id: I6de73c4dd29ecfdccb9d6529b5e3763c5adadd30
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1510012
Commit-Queue: danakj <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#639112}
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 7c243ad..bab1a37 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1192,6 +1192,9 @@
 }
 
 void RenderWidget::ScheduleAnimation() {
+  // TODO(crbug.com/939262): This shouldn't be null. That would mean we're
+  // somehow using RenderWidget after it has closed.
+  CHECK(layer_tree_view_);
   // This call is not needed in single thread mode for tests without a
   // scheduler, but they need to override the WebWidgetClient and replace this
   // method in order to schedule a synchronous composite task themselves.