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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 1089123002: Fix an NPE in BrowserPluginGuest during guest teardown while showing interstitial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 5fde66c951d3927a7f2612a621ded15c162d794a..3f3d7cad9134af58a64b6fa8127542e92ed0f21c 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -496,6 +496,18 @@ void BrowserPluginGuest::SendTextInputTypeChangedToView(
if (!guest_rwhv)
return;
+ if (!owner_web_contents_) {
+ // If we were showing an interstitial, then we can end up here during
+ // embedder shutdown or when the embedder navigates to a different page.
+ // The call stack is roughly:
+ // BrowserPluginGuest::SetFocus()
+ // content::InterstitialPageImpl::Hide()
+ // content::InterstitialPageImpl::DontProceed().
+ //
+ // TODO(lazyboy): Write a WebUI test once http://crbug.com/463674 is fixed.
+ return;
+ }
+
guest_rwhv->TextInputTypeChanged(last_text_input_type_, last_input_mode_,
last_can_compose_inline_, last_input_flags_);
// Enable input method for guest if it's enabled for the embedder.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698