[webkit-changes] [WebKit/WebKit] 4e1ba6: [IsDeprecatedWeakRefSmartPointerException] Make Sp...
Rupin Mittal
noreply at github.com
Sun Sep 29 11:49:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4e1ba66c57dfdc05d16b3e221ca567d5da4f000e
https://github.com/WebKit/WebKit/commit/4e1ba66c57dfdc05d16b3e221ca567d5da4f000e
Author: Rupin Mittal <rupin at apple.com>
Date: 2024-09-29 (Sun, 29 Sep 2024)
Changed paths:
M Source/WebCore/Modules/speech/SpeechSynthesis.cpp
M Source/WebCore/Modules/speech/SpeechSynthesis.h
M Source/WebCore/page/Page.h
M Source/WebCore/page/PageConfiguration.h
M Source/WebCore/page/SpeechSynthesisClient.h
M Source/WebKit/WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
Log Message:
-----------
[IsDeprecatedWeakRefSmartPointerException] Make SpeechSynthesisClient ref-counted
https://bugs.webkit.org/show_bug.cgi?id=280555
rdar://136865003
Reviewed by Chris Dumez.
We remove IsDeprecatedWeakRefSmartPointerException by making SpeechSynthesisClient
ref-counted.
WebSpeechSynthesisClient is owned by Page. Since it's 'now ref-counted, it's possible
for it to out-live the Page, which would be a problem. To ensure that
WebSpeecSynthesisClient never tries to use it's WebPage member if the Page has been
destroyed, we change the m_page member to be a WeakPtr instead of a WeakRef and
null-check m_page before using it.
* Source/WebCore/Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::create):
(WebCore::SpeechSynthesis::SpeechSynthesis):
(WebCore::SpeechSynthesis::getVoices):
(WebCore::SpeechSynthesis::startSpeakingImmediately):
(WebCore::SpeechSynthesis::cancel):
(WebCore::SpeechSynthesis::pause):
(WebCore::SpeechSynthesis::resumeSynthesis):
(WebCore::Ref<SpeechSynthesis>SpeechSynthesis::create): Deleted.
* Source/WebCore/Modules/speech/SpeechSynthesis.h:
* Source/WebCore/page/Page.h:
* Source/WebCore/page/PageConfiguration.h:
* Source/WebCore/page/SpeechSynthesisClient.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebSpeechSynthesisClient.cpp:
(WebKit::WebSpeechSynthesisClient::voiceList):
(WebKit::WebSpeechSynthesisClient::corePageObserver const):
(WebKit::WebSpeechSynthesisClient::resetState):
(WebKit::WebSpeechSynthesisClient::speak):
(WebKit::WebSpeechSynthesisClient::cancel):
(WebKit::WebSpeechSynthesisClient::pause):
(WebKit::WebSpeechSynthesisClient::resume):
(WebKit::WebSpeechSynthesisClient::protectedPage const): Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h:
(WebKit::WebSpeechSynthesisClient::~WebSpeechSynthesisClient): Deleted.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAnimationController):
Canonical link: https://commits.webkit.org/284434@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list