Commit e2a23785 authored by dmazzoni@chromium.org's avatar dmazzoni@chromium.org

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 sentence.

Review URL: https://chromiumcodereview.appspot.com/10413054

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138393 0039d316-1c4b-4281-b951-d872f2087c98
parent b7b5d64a
......@@ -53,6 +53,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_;
......
......@@ -207,7 +207,8 @@ ExtensionTtsPlatformImplWin::ExtensionTtsPlatformImplWin()
// static
ExtensionTtsPlatformImplWin* ExtensionTtsPlatformImplWin::GetInstance() {
return Singleton<ExtensionTtsPlatformImplWin>::get();
return Singleton<ExtensionTtsPlatformImplWin,
LeakySingletonTraits<ExtensionTtsPlatformImplWin> >::get();
}
// static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment