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

Unified Diff: Source/platform/speech/PlatformSpeechSynthesizer.cpp

Issue 1148383012: Oilpan: prefer eager finalization over prefinalizers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: expand&improve comments Created 5 years, 6 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 | « Source/platform/speech/PlatformSpeechSynthesizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/speech/PlatformSpeechSynthesizer.cpp
diff --git a/Source/platform/speech/PlatformSpeechSynthesizer.cpp b/Source/platform/speech/PlatformSpeechSynthesizer.cpp
index 9363765d5818ef8fd6f63e21fc983d2972f0b768..9262b0313eedf07e5ba73e58e402e244f5eb218e 100644
--- a/Source/platform/speech/PlatformSpeechSynthesizer.cpp
+++ b/Source/platform/speech/PlatformSpeechSynthesizer.cpp
@@ -48,24 +48,12 @@ PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerCl
{
m_webSpeechSynthesizerClient = new WebSpeechSynthesizerClientImpl(this, client);
m_webSpeechSynthesizer = adoptPtr(Platform::current()->createSpeechSynthesizer(m_webSpeechSynthesizerClient));
- ThreadState::current()->registerPreFinalizer(*this);
}
PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
{
}
-// Since the m_webSpeechSynthesizer (i.e., TtsDispatcher in the chrome side)
-// holds a raw pointer back to the m_webSpeechSynthesizerClient, we need to
-// make sure that the raw pointer is cleared before the sweeping starts.
-// Otherwise, m_webSpeechSynthesizerClient might end up being lazily swept
-// before this PlatformSpeechSynthesizer object is, leaving
-// m_sweepSpeechSynthesizer with a dangling pointer to a freed object.
-void PlatformSpeechSynthesizer::dispose()
-{
- m_webSpeechSynthesizer.clear();
-}
-
void PlatformSpeechSynthesizer::speak(PlatformSpeechSynthesisUtterance* utterance)
{
if (m_webSpeechSynthesizer && m_webSpeechSynthesizerClient)
« no previous file with comments | « Source/platform/speech/PlatformSpeechSynthesizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698