Title: [167899] trunk/Source/WebCore
Revision
167899
Author
cfleiz...@apple.com
Date
2014-04-28 12:57:24 -0700 (Mon, 28 Apr 2014)

Log Message

REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
https://bugs.webkit.org/show_bug.cgi?id=111613

Reviewed by Mark Lam.

I think it's possible that didFinishSpeaking ends up calling directly back into start speaking, and the utterance reference
we were holding can get cleared, so protecting this should avoid a few asserts.

* platform/mock/PlatformSpeechSynthesizerMock.cpp:
(WebCore::PlatformSpeechSynthesizerMock::speakingFinished):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167898 => 167899)


--- trunk/Source/WebCore/ChangeLog	2014-04-28 19:56:46 UTC (rev 167898)
+++ trunk/Source/WebCore/ChangeLog	2014-04-28 19:57:24 UTC (rev 167899)
@@ -1,3 +1,16 @@
+2014-04-28  Chris Fleizach  <cfleiz...@apple.com>
+
+        REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
+        https://bugs.webkit.org/show_bug.cgi?id=111613
+
+        Reviewed by Mark Lam.
+
+        I think it's possible that didFinishSpeaking ends up calling directly back into start speaking, and the utterance reference
+        we were holding can get cleared, so protecting this should avoid a few asserts.
+
+        * platform/mock/PlatformSpeechSynthesizerMock.cpp:
+        (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
+
 2014-04-28  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r167871.

Modified: trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp (167898 => 167899)


--- trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp	2014-04-28 19:56:46 UTC (rev 167898)
+++ trunk/Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp	2014-04-28 19:57:24 UTC (rev 167899)
@@ -44,8 +44,10 @@
 void PlatformSpeechSynthesizerMock::speakingFinished(Timer<PlatformSpeechSynthesizerMock>*)
 {
     ASSERT(m_utterance.get());
-    client()->didFinishSpeaking(m_utterance);
+    RefPtr<PlatformSpeechSynthesisUtterance> protect(m_utterance);
     m_utterance = 0;
+    
+    client()->didFinishSpeaking(protect);
 }
     
 void PlatformSpeechSynthesizerMock::initializeVoiceList()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to