DescriptionFix an NPE in BrowserPluginGuest during guest teardown while showing interstitial.
r324002 introduced a code path where we call
BrowserPluginGuest::SendTextInputTypeChangedToView() during shutdown via
BrowserPluginGuest::SetFocus(). This happens when guest is showing
interstitial page.
There are couple of ways this can happen, either when the embedder page
closes or the embedder page navigates to a different page.
GuestViewBase::OwnerContentsObserver detects these two cases and calls
BrowserPluginGuest shutdown path. During that time if guest was showing an
interstitial, then it closes the interstitial which in that case would call:
content::InterstitialPageImpl::DontProceed() /
content::InterstitialPageImpl::Hide()
Hide() ends up calling BrowserPluginGuest::SetFocus() and we hit the NPE.
BUG=477126, 477132
Test=Navigate a tab chrome signin page, after changing the system
clock to few years back, observe that it is shows interstitial.
Either of the following reproduces the behavior:
a) close the tab
b) navigate the tab to some webpage, e.g. http://test.com
Committed: https://crrev.com/8664beb06cdff77b4f02154d47bd1f762d2b895a
Cr-Commit-Position: refs/heads/master@{#325193}
Patch Set 1 #
Messages
Total messages: 7 (2 generated)
|