diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 23:17:29 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 23:17:29 +0000 |
commit | d43c46292e632778c45836bef79880b5474c2178 (patch) | |
tree | 1c5eb1688dcfb949f9a121e4a0eecf4927a1e1a1 | |
parent | dc6b2c3687abbc4007ea1314e3ecfee0ad58b046 (diff) | |
download | chromium_src-d43c46292e632778c45836bef79880b5474c2178.zip chromium_src-d43c46292e632778c45836bef79880b5474c2178.tar.gz chromium_src-d43c46292e632778c45836bef79880b5474c2178.tar.bz2 |
Merge 138393 - Make ExtensionTtsPlatformImplWin a leaky singleton to avoid a crash in the destructor.
BUG=122026
TEST=Does not crash on shutdown on XP. Speech still stops if you load TTS Demo and exit in the middle of a long sentencexsxc.
Review URL: https://chromiumcodereview.appspot.com/10413054
TBR=dmazzoni@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10447049
git-svn-id: svn://svn.chromium.org/chrome/branches/1084/src@139140 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/speech/extension_api/tts_extension_api_platform.h | 3 | ||||
-rw-r--r-- | chrome/browser/speech/extension_api/tts_extension_api_win.cc | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/speech/extension_api/tts_extension_api_platform.h b/chrome/browser/speech/extension_api/tts_extension_api_platform.h index 5fb90c5..53a000a 100644 --- a/chrome/browser/speech/extension_api/tts_extension_api_platform.h +++ b/chrome/browser/speech/extension_api/tts_extension_api_platform.h @@ -49,6 +49,9 @@ class ExtensionTtsPlatformImpl { protected: ExtensionTtsPlatformImpl() {} + + // On some platforms this may be a leaky singleton - do not rely on the + // destructor being called! http://crbug.com/122026 virtual ~ExtensionTtsPlatformImpl() {} std::string error_; diff --git a/chrome/browser/speech/extension_api/tts_extension_api_win.cc b/chrome/browser/speech/extension_api/tts_extension_api_win.cc index 69eae63..cc4f0e7 100644 --- a/chrome/browser/speech/extension_api/tts_extension_api_win.cc +++ b/chrome/browser/speech/extension_api/tts_extension_api_win.cc @@ -213,7 +213,8 @@ ExtensionTtsPlatformImplWin::ExtensionTtsPlatformImplWin() // static ExtensionTtsPlatformImplWin* ExtensionTtsPlatformImplWin::GetInstance() { - return Singleton<ExtensionTtsPlatformImplWin>::get(); + return Singleton<ExtensionTtsPlatformImplWin, + LeakySingletonTraits<ExtensionTtsPlatformImplWin> >::get(); } // static |