Changeset 245178 in webkit


Ignore:
Timestamp:
May 10, 2019 10:19:24 AM (5 years ago)
Author:
Chris Fleizach
Message:

AX: Crash at WebKit: WebKit::WebSpeechSynthesisClient::speak
https://bugs.webkit.org/show_bug.cgi?id=197761
<rdar://problem/50237614>

Reviewed by Per Arne Vollan.

Source/WebKit:

It's valid for the incoming voice to be nil, so we need to protect against that.

Tests: fast/speechsynthesis/speech-synthesis-real-client-version.html

  • WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp:

(WebKit::WebSpeechSynthesisClient::speak):

LayoutTests:

  • fast/speechsynthesis/speech-synthesis-real-client-version-expected.txt: Added.
  • fast/speechsynthesis/speech-synthesis-real-client-version.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245175 r245178  
     12019-05-10  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Crash at WebKit: WebKit::WebSpeechSynthesisClient::speak
     4        https://bugs.webkit.org/show_bug.cgi?id=197761
     5        <rdar://problem/50237614>
     6
     7        Reviewed by Per Arne Vollan.
     8
     9        * fast/speechsynthesis/speech-synthesis-real-client-version-expected.txt: Added.
     10        * fast/speechsynthesis/speech-synthesis-real-client-version.html: Added.
     11
    1122019-05-10  Antti Koivisto  <antti@apple.com>
    213
  • trunk/Source/WebKit/ChangeLog

    r245176 r245178  
     12019-05-10  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Crash at WebKit: WebKit::WebSpeechSynthesisClient::speak
     4        https://bugs.webkit.org/show_bug.cgi?id=197761
     5        <rdar://problem/50237614>
     6
     7        Reviewed by Per Arne Vollan.
     8
     9        It's valid for the incoming voice to be nil, so we need to protect against that.
     10
     11        Tests: fast/speechsynthesis/speech-synthesis-real-client-version.html
     12
     13        * WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp:
     14        (WebKit::WebSpeechSynthesisClient::speak):
     15
    1162019-05-10  Michael Catanzaro  <mcatanzaro@igalia.com>
    217
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp

    r243002 r245178  
    5959
    6060    auto voice = utterance->voice();
    61     m_page.sendWithAsyncReply(Messages::WebPageProxy::SpeechSynthesisSpeak(utterance->text(), utterance->lang(), utterance->volume(), utterance->rate(), utterance->pitch(), utterance->startTime(), voice->voiceURI(), voice->name(), voice->lang(), voice->localService(), voice->isDefault()), WTFMove(completionHandler));
     61    auto voiceURI = voice ? voice->voiceURI() : "";
     62    auto name = voice ? voice->name() : "";
     63    auto lang = voice ? voice->lang() : "";
     64    auto localService = voice ? voice->localService() : false;
     65    auto isDefault = voice ? voice->isDefault() : false;
     66
     67    m_page.sendWithAsyncReply(Messages::WebPageProxy::SpeechSynthesisSpeak(utterance->text(), utterance->lang(), utterance->volume(), utterance->rate(), utterance->pitch(), utterance->startTime(), voiceURI, name, lang, localService, isDefault), WTFMove(completionHandler));
    6268
    6369    m_page.corePage()->speechSynthesisClient()->observer()->didStartSpeaking();
Note: See TracChangeset for help on using the changeset viewer.