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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10823381: Fix a crash in TestingAutomationProvider::GetTabInfo on ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 4e8e4bc0986b3a98aee222d9df220157cae98431..6216b1bf2e1be7e29c6943f3a5f508b3f8b05d35 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -6668,6 +6668,10 @@ void TestingAutomationProvider::GetTabInfo(
std::string error;
if (GetBrowserAndTabFromJSONArgs(args, &browser, &tab, &error)) {
NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ if (!entry) {
+ reply.SendError("Unable to get active navigation entry");
+ return;
+ }
DictionaryValue dict;
dict.SetString("title", entry->GetTitleForDisplay(""));
dict.SetString("url", entry->GetVirtualURL().spec());
« 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