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

Unified Diff: Source/modules/speech/SpeechSynthesis.cpp

Issue 228133002: Fix crash if utterance is garbage-collected before speech ends. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch to RefPtrWillBeRawPtr Created 6 years, 8 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 | « LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/speech/SpeechSynthesis.cpp
diff --git a/Source/modules/speech/SpeechSynthesis.cpp b/Source/modules/speech/SpeechSynthesis.cpp
index 00b60091d8d97ef02dbd8da2764236da39ca1907..22e026358e12f11cbff8ae0667cc6fced4ccc2ec 100644
--- a/Source/modules/speech/SpeechSynthesis.cpp
+++ b/Source/modules/speech/SpeechSynthesis.cpp
@@ -152,6 +152,7 @@ void SpeechSynthesis::fireEvent(const AtomicString& type, SpeechSynthesisUtteran
void SpeechSynthesis::handleSpeakingCompleted(SpeechSynthesisUtterance* utterance, bool errorOccurred)
{
ASSERT(utterance);
+ RefPtrWillBeRawPtr<SpeechSynthesisUtterance> protect(utterance);
bool didJustFinishCurrentUtterance = false;
// If the utterance that completed was the one we're currently speaking,
« no previous file with comments | « LayoutTests/fast/speechsynthesis/speech-synthesis-gc-utterance-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698