| Index: Source/modules/speech/SpeechSynthesis.cpp
|
| diff --git a/Source/modules/speech/SpeechSynthesis.cpp b/Source/modules/speech/SpeechSynthesis.cpp
|
| index 00b60091d8d97ef02dbd8da2764236da39ca1907..d5b5608d6e26ef6985239cf939dd9b99d8a532b8 100644
|
| --- a/Source/modules/speech/SpeechSynthesis.cpp
|
| +++ b/Source/modules/speech/SpeechSynthesis.cpp
|
| @@ -153,6 +153,10 @@ void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utteranc
|
| {
|
| ASSERT(utterance);
|
|
|
| + // Keep the utterance around long enough to fire an event on it in case m_utteranceQueue
|
| + // is holding the last reference to it.
|
| + RefPtrWillBeRawPtr<SpeechSynthesisUtterance> protect(utterance);
|
| +
|
| bool didJustFinishCurrentUtterance = false;
|
| // If the utterance that completed was the one we're currently speaking,
|
| // remove it from the queue and start speaking the next one.
|
|
|