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

Unified Diff: chrome/browser/extensions/extension_tts_engine_api.cc

Issue 8437080: Fix crash when TTS utterances are queued on shutdown. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
Index: chrome/browser/extensions/extension_tts_engine_api.cc
===================================================================
--- chrome/browser/extensions/extension_tts_engine_api.cc (revision 107928)
+++ chrome/browser/extensions/extension_tts_engine_api.cc (working copy)
@@ -80,6 +80,11 @@
Utterance* utterance,
const Extension** matching_extension,
size_t* voice_index) {
+ // This will only happen during unit testing. Otherwise, an utterance
+ // will always have an associated profile.
+ if (!utterance->profile())
+ return false;
+
ExtensionService* service = utterance->profile()->GetExtensionService();
DCHECK(service);
ExtensionEventRouter* event_router =

Powered by Google App Engine
This is Rietveld 408576698