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

Unified Diff: chrome/browser/speech/extension_api/tts_engine_extension_api.cc

Issue 10896021: Fix crash caused when speech is generated at Chrome OS startup before ExtensionService is initializ… (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/speech/extension_api/tts_engine_extension_api.cc
diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
index 8ed12c623300ca06a61169c0069ccb1de90017e9..7e80c3613d77570fde8c09725e8f1e56912c3ca4 100644
--- a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
+++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc
@@ -99,7 +99,12 @@ bool GetMatchingExtensionVoice(
return false;
ExtensionService* service = utterance->profile()->GetExtensionService();
- DCHECK(service);
+
+ // If speech is generated when Chrome OS first starts up, it's possible
+ // the extension service isn't even available.
+ if (!service)
+ return false;
+
extensions::EventRouter* event_router =
utterance->profile()->GetExtensionEventRouter();
DCHECK(event_router);
« 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