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

Unified Diff: chrome/browser/task_management/providers/web_contents/guest_task.cc

Issue 2148083002: Fix interstitial pages not updating the task manager renderers' titles and favicons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 | chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_management/providers/web_contents/guest_task.cc
diff --git a/chrome/browser/task_management/providers/web_contents/guest_task.cc b/chrome/browser/task_management/providers/web_contents/guest_task.cc
index bf092cbbe190a032b4adbc9781aa6b055fc6084c..7167c7d092b2ea50d54d1158f0c47228bbb3a1c4 100644
--- a/chrome/browser/task_management/providers/web_contents/guest_task.cc
+++ b/chrome/browser/task_management/providers/web_contents/guest_task.cc
@@ -40,7 +40,13 @@ base::string16 GuestTask::GetCurrentTitle(
guest_view::GuestViewBase* guest =
guest_view::GuestViewBase::FromWebContents(web_contents);
- DCHECK(guest);
+ if (!guest) {
+ // This can happen when an AppWindowContentsImpl is destroyed. It emits a
+ // DidFinishNavigation() events to the WebContentsObservers which triggers a
+ // title update in WebContentsTaskProvider. This happens before
+ // WebContentsDestroyed() is emitted.
+ return title();
+ }
base::string16 title =
l10n_util::GetStringFUTF16(guest->GetTaskPrefix(),
« no previous file with comments | « no previous file | chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698