WebKit Bugzilla
Attachment 370855 Details for
Bug 198336
: Modernize getting proxies of UserMediaCaptureManagerProxy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198336-20190529094452.patch (text/plain), 3.48 KB, created by
youenn fablet
on 2019-05-29 09:44:53 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-05-29 09:44:53 PDT
Size:
3.48 KB
patch
obsolete
>Subversion Revision: 245849 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 1ae3deb1e1b787add15db66a21ef0372378f279a..3851b9af53374955da1e5eaa2d4f8ecdece002dc 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-29 Youenn Fablet <youenn@apple.com> >+ >+ Modernize getting proxies of UserMediaCaptureManagerProxy >+ https://bugs.webkit.org/show_bug.cgi?id=198336 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No change of behavior, use HashMap::get instead of find. >+ >+ * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: >+ (WebKit::UserMediaCaptureManagerProxy::startProducingData): >+ (WebKit::UserMediaCaptureManagerProxy::stopProducingData): >+ (WebKit::UserMediaCaptureManagerProxy::capabilities): >+ (WebKit::UserMediaCaptureManagerProxy::setMuted): >+ (WebKit::UserMediaCaptureManagerProxy::applyConstraints): >+ > 2019-05-29 Youenn Fablet <youenn@apple.com> > > UserMediaCaptureManagerProxy::SourceProxy should directly have access to its IPC connection >diff --git a/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp b/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp >index 47ff4e910f76c70105ac244012038bb70b8bd247..48c2b2b4e061069272aeb8b94a234eaa926af76d 100644 >--- a/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp >@@ -177,17 +177,15 @@ void UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstrai > void UserMediaCaptureManagerProxy::startProducingData(uint64_t id) > { > MESSAGE_CHECK_CONTEXTID(id); >- auto iter = m_proxies.find(id); >- if (iter != m_proxies.end()) >- iter->value->source().start(); >+ if (auto* proxy = m_proxies.get(id)) >+ proxy->source().start(); > } > > void UserMediaCaptureManagerProxy::stopProducingData(uint64_t id) > { > MESSAGE_CHECK_CONTEXTID(id); >- auto iter = m_proxies.find(id); >- if (iter != m_proxies.end()) >- iter->value->source().stop(); >+ if (auto* proxy = m_proxies.get(id)) >+ proxy->source().stop(); > } > > void UserMediaCaptureManagerProxy::end(uint64_t id) >@@ -200,28 +198,26 @@ void UserMediaCaptureManagerProxy::capabilities(uint64_t id, CompletionHandler<v > { > MESSAGE_CHECK_CONTEXTID(id); > WebCore::RealtimeMediaSourceCapabilities capabilities; >- auto iter = m_proxies.find(id); >- if (iter != m_proxies.end()) >- capabilities = iter->value->source().capabilities(); >+ if (auto* proxy = m_proxies.get(id)) >+ capabilities = proxy->source().capabilities(); > completionHandler(WTFMove(capabilities)); > } > > void UserMediaCaptureManagerProxy::setMuted(uint64_t id, bool muted) > { > MESSAGE_CHECK_CONTEXTID(id); >- auto iter = m_proxies.find(id); >- if (iter != m_proxies.end()) >- iter->value->source().setMuted(muted); >+ if (auto* proxy = m_proxies.get(id)) >+ proxy->source().setMuted(muted); > } > > void UserMediaCaptureManagerProxy::applyConstraints(uint64_t id, const WebCore::MediaConstraints& constraints) > { > MESSAGE_CHECK_CONTEXTID(id); >- auto iter = m_proxies.find(id); >- if (iter == m_proxies.end()) >+ auto* proxy = m_proxies.get(id); >+ if (!proxy) > return; > >- auto& source = iter->value->source(); >+ auto& source = proxy->source(); > auto result = source.applyConstraints(constraints); > if (!result) > m_process.send(Messages::UserMediaCaptureManager::ApplyConstraintsSucceeded(id, source.settings()), 0);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198336
: 370855