From 83ee78451ad9d861deb0f14634f6c3fc2300e5d1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 1 Dec 2015 17:52:13 +0800 Subject: [PATCH] Emit event when title becomes empty --- atom/browser/api/atom_api_web_contents.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 339be85fe9bd..0c8a5ff3df25 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -519,9 +519,10 @@ void WebContents::DidNavigateMainFrame( void WebContents::TitleWasSet(content::NavigationEntry* entry, bool explicit_set) { - // Back/Forward navigation may have pruned entries. if (entry) Emit("page-title-set", entry->GetTitle(), explicit_set); + else + Emit("page-title-set", "", explicit_set); } void WebContents::DidUpdateFaviconURL(