WebSpeech: crash at WebCore::SpeechSynthesis::speak
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 21:51:17 +0000 (21:51 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Apr 2013 21:51:17 +0000 (21:51 +0000)
commit38ea3f407ca4388ab6fb6032ea77aafba722e5a9
tree9211ec3b3971ec34824174030b55ca96fe89fa9a
parentd8227bf2bd9d86ef48262f4ca19c366388ac1cce
WebSpeech: crash at WebCore::SpeechSynthesis::speak
https://bugs.webkit.org/show_bug.cgi?id=113937

Reviewed by Tim Horton.

Source/WebCore:

Protect against the case when invalid data is passed in.

Test: platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html

* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::speak):
* Modules/speech/SpeechSynthesisUtterance.cpp:
(WebCore::SpeechSynthesisUtterance::setVoice):

LayoutTests:

* platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt: Added.
* platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/speech/SpeechSynthesis.cpp
Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp