Fix crash when DecrementCapturerCount() makes a delayed WasHidden() call during WebContentsImpl destruction.

Two parts:

1. WebContentsImpl::DecrementCapturerCount() will restore the true "WasHidden" status of the RenderWidgetHost once the counter reaches zero.  However, DecrementCapturerCount() can be called [indirectly] from the WebContentsImpl destructor.  In this case, it should not attempt to change/notify anything.

2. It's possible for ThumbnailTabHelper::WidgetHidden() to call ThumbnailTabHelper::UpdateThumbnailIfNecessary() with a NULL pointer.  Added a NULL check.

BUG=175275,130097


Review URL: https://chromiumcodereview.appspot.com/12209104

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181876 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed