Changeset 247620 in webkit


Ignore:
Timestamp:
Jul 18, 2019 2:42:13 PM (5 years ago)
Author:
pvollan@apple.com
Message:

Crash under WebPage::boundaryEventOccurred
https://bugs.webkit.org/show_bug.cgi?id=199907

Reviewed by Chris Fleizach.

Add null pointer checks.

No new tests, since I have not been able to reproduce this in a test.

  • Modules/speech/SpeechSynthesis.cpp:

(WebCore::SpeechSynthesis::didStartSpeaking):
(WebCore::SpeechSynthesis::didFinishSpeaking):
(WebCore::SpeechSynthesis::didPauseSpeaking):
(WebCore::SpeechSynthesis::didResumeSpeaking):
(WebCore::SpeechSynthesis::speakingErrorOccurred):
(WebCore::SpeechSynthesis::boundaryEventOccurred):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r247573 r247620  
     12019-07-18  Per Arne Vollan  <pvollan@apple.com>
     2
     3        Crash under WebPage::boundaryEventOccurred
     4        https://bugs.webkit.org/show_bug.cgi?id=199907
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Add null pointer checks.
     9
     10        No new tests, since I have not been able to reproduce this in a test.
     11
     12        * Modules/speech/SpeechSynthesis.cpp:
     13        (WebCore::SpeechSynthesis::didStartSpeaking):
     14        (WebCore::SpeechSynthesis::didFinishSpeaking):
     15        (WebCore::SpeechSynthesis::didPauseSpeaking):
     16        (WebCore::SpeechSynthesis::didResumeSpeaking):
     17        (WebCore::SpeechSynthesis::speakingErrorOccurred):
     18        (WebCore::SpeechSynthesis::boundaryEventOccurred):
     19
    1202019-07-18  Antoine Quint  <graouts@apple.com>
    221
  • trunk/Source/WebCore/Modules/speech/SpeechSynthesis.cpp

    r246490 r247620  
    226226void SpeechSynthesis::didStartSpeaking()
    227227{
     228    if (!m_currentSpeechUtterance)
     229        return;
    228230    didStartSpeaking(*m_currentSpeechUtterance->platformUtterance());
    229231}
     
    231233void SpeechSynthesis::didFinishSpeaking()
    232234{
     235    if (!m_currentSpeechUtterance)
     236        return;
    233237    didFinishSpeaking(*m_currentSpeechUtterance->platformUtterance());
    234238}
     
    236240void SpeechSynthesis::didPauseSpeaking()
    237241{
     242    if (!m_currentSpeechUtterance)
     243        return;
    238244    didPauseSpeaking(*m_currentSpeechUtterance->platformUtterance());
    239245}
     
    241247void SpeechSynthesis::didResumeSpeaking()
    242248{
     249    if (!m_currentSpeechUtterance)
     250        return;
    243251    didResumeSpeaking(*m_currentSpeechUtterance->platformUtterance());
    244252}
     
    246254void SpeechSynthesis::speakingErrorOccurred()
    247255{
     256    if (!m_currentSpeechUtterance)
     257        return;
    248258    speakingErrorOccurred(*m_currentSpeechUtterance->platformUtterance());
    249259}
     
    251261void SpeechSynthesis::boundaryEventOccurred(bool wordBoundary, unsigned charIndex)
    252262{
     263    if (!m_currentSpeechUtterance)
     264        return;
    253265    boundaryEventOccurred(*m_currentSpeechUtterance->platformUtterance(), wordBoundary ? SpeechBoundary::SpeechWordBoundary : SpeechBoundary::SpeechSentenceBoundary, charIndex);
    254266}
Note: See TracChangeset for help on using the changeset viewer.