Add checks in ChromeClientImpl for invalid ScheduleAnimation calls.

We expect that we don't go to ScheduleAnimation if the document is
shutdown. We can perhaps also see if the frame is the mainframe or
another frame with an aliased local variable.

R=dcheng@chromium.org

Bug: 939262
Change-Id: Iafe808bcda161cffdb5889c438bc232398db01af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1526431
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#641406}
3 files changed