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

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
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_controller_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tts_engine_api.cc
===================================================================
--- chrome/browser/extensions/extension_tts_engine_api.cc (revision 109814)
+++ 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 =
« no previous file with comments | « chrome/browser/extensions/extension_tts_api_controller_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698