-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make SpeechSynthesisUtterance an ActiveDOMObject #16714
Make SpeechSynthesisUtterance an ActiveDOMObject #16714
Conversation
EWS run on previous version of this PR (hash 472814b) |
472814b
to
c8b007f
Compare
EWS run on previous version of this PR (hash c8b007f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me on the original PR.
c8b007f
to
48f207c
Compare
EWS run on current version of this PR (hash 48f207c) |
https://bugs.webkit.org/show_bug.cgi?id=260214 rdar://113921763 Reviewed by Ryosuke Niwa. Currently dispatching event to SpeechSynthesisUtterance can lead to crash due to GC. To fix that, we now keep wrapper of SpeechSynthesisUtterance alive until there is no more event to be dispatched. This can happen in two cases: 1. SpeechSynthesisUtterance is not processed yet, and is removed from SpeechSynthesis's queue (i.e. the utterance will not be processed). 2. SpeechSynthesisUtterance is being processed, and it finishes dispatching end or error event -- these two events are the last events to be fired on an untterance according to spec: https://wicg.github.io/speech-api/#utterance-events. * Source/WebCore/Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::setPlatformSynthesizer): (WebCore::SpeechSynthesis::cancel): (WebCore::SpeechSynthesis::clearUtteranceQueue): * Source/WebCore/Modules/speech/SpeechSynthesis.h: * Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp: (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance): (WebCore::SpeechSynthesisUtterance::eventOccurred): (WebCore::SpeechSynthesisUtterance::errorEventOccurred): (WebCore::SpeechSynthesisUtterance::dispatchEventAndUpdateState): (WebCore::SpeechSynthesisUtterance::setIsActiveForEventDispatch): (WebCore::SpeechSynthesisUtterance::activeDOMObjectName const): (WebCore::SpeechSynthesisUtterance::virtualHasPendingActivity const): * Source/WebCore/Modules/speech/SpeechSynthesisUtterance.h: * Source/WebCore/Modules/speech/SpeechSynthesisUtterance.idl: Canonical link: https://commits.webkit.org/266959@main
48f207c
to
42ffbe1
Compare
Committed 266959@main (42ffbe1): https://commits.webkit.org/266959@main Reviewed commits have been landed. Closing PR #16714 and removing active labels. |
42ffbe1
48f207c
π§ͺ mac-AS-debug-wk2