Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 335771b16fe5502cee59806639614d5a0b19c40c https://github.com/WebKit/WebKit/commit/335771b16fe5502cee59806639614d5a0b19c40c Author: Sihui Liu <sihui_...@apple.com> Date: 2023-08-16 (Wed, 16 Aug 2023)
Changed paths: M Source/WebCore/Modules/speech/SpeechSynthesis.cpp M Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp Log Message: ----------- REGRESSION(266959@main): [ Debug ] ASSERTION FAILED: m_suspendIfNeededWasCalled https://bugs.webkit.org/show_bug.cgi?id=260314 rdar://113993253 Reviewed by Ryosuke Niwa. The assertion failure happens when running layout test under LayoutTests/fast/speechsynthesis. The patch fixes it by invoking suspendIfNeeded() upon creation of SpeechSynthesisUtterance. This patch also contains two drive-by fixes: 1. When m_completionHandler of SpeechSynthesisUtterance is set, event is passed to the handler instead of being dispatched, so wrapper of SpeechSynthesisUtterance does not need be kept alive for event dispatch. 2. SpeechSynthesisUtterance should be marked as active for event dispatch when it is handed over to SpeechSynthesis. * Source/WebCore/Modules/speech/SpeechSynthesis.cpp: (WebCore::SpeechSynthesis::speak): * Source/WebCore/Modules/speech/SpeechSynthesisUtterance.cpp: (WebCore::SpeechSynthesisUtterance::create): (WebCore::SpeechSynthesisUtterance::setIsActiveForEventDispatch): Canonical link: https://commits.webkit.org/266990@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes