Remove the Timer parameters from timer callbacks
[WebKit-https.git] / Source / WebCore / platform / mock / PlatformSpeechSynthesizerMock.cpp
index 5b87b63..3838372 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
 
 PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock(PlatformSpeechSynthesizerClient* client)
     : PlatformSpeechSynthesizer(client)
-    , m_speakingFinishedTimer(this, &PlatformSpeechSynthesizerMock::speakingFinished)
+    , m_speakingFinishedTimer(*this, &PlatformSpeechSynthesizerMock::speakingFinished)
 {
 }
     
@@ -41,11 +41,13 @@ PlatformSpeechSynthesizerMock::~PlatformSpeechSynthesizerMock()
 {
 }
 
-void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthesizerMock>*)
+void PlatformSpeechSynthesizerMock::speakingFinished()
 {
     ASSERT(m_utterance.get());
-    client()->didFinishSpeaking(m_utterance);
+    RefPtr<PlatformSpeechSynthesisUtterance> protect(m_utterance);
     m_utterance = 0;
+    
+    client()->didFinishSpeaking(protect);
 }
     
 void PlatformSpeechSynthesizerMock::initializeVoiceList()