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

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

Issue 180553004: Fix use-after-free of m_currentSpeechUtterance. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix nullptr again? Created 6 years, 10 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
Index: Source/modules/speech/SpeechSynthesis.h
diff --git a/Source/modules/speech/SpeechSynthesis.h b/Source/modules/speech/SpeechSynthesis.h
index eaa546f8aed2e61ebd98cbdd65c4b3ec5beeac81..934e99ac9dd08c9c16d2e78ecd71e300703e480d 100644
--- a/Source/modules/speech/SpeechSynthesis.h
+++ b/Source/modules/speech/SpeechSynthesis.h
@@ -81,13 +81,15 @@ private:
virtual void speakingErrorOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>) OVERRIDE;
virtual void boundaryEventOccurred(PassRefPtr<PlatformSpeechSynthesisUtterance>, SpeechBoundary, unsigned charIndex) OVERRIDE;
- void startSpeakingImmediately(SpeechSynthesisUtterance*);
+ void startSpeakingImmediately();
void handleSpeakingCompleted(SpeechSynthesisUtterance*, bool errorOccurred);
void fireEvent(const AtomicString& type, SpeechSynthesisUtterance*, unsigned long charIndex, const String& name);
+ // Returns the utterance at the front of the queue.
+ SpeechSynthesisUtterance* currentSpeechUtterance() const;
+
OwnPtr<PlatformSpeechSynthesizer> m_platformSpeechSynthesizer;
WillBeHeapVector<RefPtrWillBeMember<SpeechSynthesisVoice> > m_voiceList;
- RawPtrWillBeMember<SpeechSynthesisUtterance> m_currentSpeechUtterance;
Deque<RefPtrWillBeMember<SpeechSynthesisUtterance> > m_utteranceQueue;
bool m_isPaused;
« no previous file with comments | « LayoutTests/fast/speechsynthesis/speech-synthesis-cancel-twice-expected.txt ('k') | Source/modules/speech/SpeechSynthesis.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698