Changeset 147800 in webkit


Ignore:
Timestamp:
Apr 5, 2013 2:51:17 PM (11 years ago)
Author:
Chris Fleizach
Message:

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.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147768 r147800  
     12013-04-05  Chris Fleizach  <cfleizach@apple.com>
     2
     3        WebSpeech: crash at WebCore::SpeechSynthesis::speak
     4        https://bugs.webkit.org/show_bug.cgi?id=113937
     5
     6        Reviewed by Tim Horton.
     7
     8        * platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt: Added.
     9        * platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html: Added.
     10
    1112013-04-05  Rijubrata Bhaumik  <rijubrata.bhaumik@intel.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r147797 r147800  
     12013-04-05  Chris Fleizach  <cfleizach@apple.com>
     2
     3        WebSpeech: crash at WebCore::SpeechSynthesis::speak
     4        https://bugs.webkit.org/show_bug.cgi?id=113937
     5
     6        Reviewed by Tim Horton.
     7
     8        Protect against the case when invalid data is passed in.
     9
     10        Test: platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html
     11
     12        * Modules/speech/SpeechSynthesis.cpp:
     13        (WebCore::SpeechSynthesis::speak):
     14        * Modules/speech/SpeechSynthesisUtterance.cpp:
     15        (WebCore::SpeechSynthesisUtterance::setVoice):
     16
    1172013-04-05  Antti Koivisto  <antti@apple.com>
    218
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp

    r146724 r147800  
    103103void SpeechSynthesis::speak(SpeechSynthesisUtterance* utterance)
    104104{
     105    if (!utterance)
     106        return;
     107   
    105108    m_utteranceQueue.append(utterance);
    106109   
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp

    r146724 r147800  
    6565void SpeechSynthesisUtterance::setVoice(SpeechSynthesisVoice* voice)
    6666{
     67    if (!voice)
     68        return;
     69   
    6770    // Cache our own version of the SpeechSynthesisVoice so that we don't have to do some lookup
    6871    // to go from the platform voice back to the speech synthesis voice in the read property.
Note: See TracChangeset for help on using the changeset viewer.