Title: [285125] trunk/Source/WebKit
- Revision
- 285125
- Author
- hironori.fu...@sony.com
- Date
- 2021-11-01 13:24:37 -0700 (Mon, 01 Nov 2021)
Log Message
HashMap<GraphicsContextGLIdentifier, IPC::ScopedActiveMessageReceiveQueue<RemoteGraphicsContextGL>>::get can't compile
https://bugs.webkit.org/show_bug.cgi?id=232554
Reviewed by Kimmo Kinnunen.
Because IPC::ScopedActiveMessageReceiveQueue didn't have own
HashTraits, it used GenericHashTraits. So, HashMap::get tried to
return PeekType, that was ScopedActiveMessageReceiveQueue. But, it
couldn't construct ScopedActiveMessageReceiveQueue from "const
ScopedActiveMessageReceiveQueue&".
* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::findRemoteGraphicsContextGL):
Use get() instead of find().
* Platform/IPC/ScopedActiveMessageReceiveQueue.h: Added HashTraits for it.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (285124 => 285125)
--- trunk/Source/WebKit/ChangeLog 2021-11-01 20:16:03 UTC (rev 285124)
+++ trunk/Source/WebKit/ChangeLog 2021-11-01 20:24:37 UTC (rev 285125)
@@ -1,3 +1,21 @@
+2021-11-01 Fujii Hironori <hironori.fu...@sony.com>
+
+ HashMap<GraphicsContextGLIdentifier, IPC::ScopedActiveMessageReceiveQueue<RemoteGraphicsContextGL>>::get can't compile
+ https://bugs.webkit.org/show_bug.cgi?id=232554
+
+ Reviewed by Kimmo Kinnunen.
+
+ Because IPC::ScopedActiveMessageReceiveQueue didn't have own
+ HashTraits, it used GenericHashTraits. So, HashMap::get tried to
+ return PeekType, that was ScopedActiveMessageReceiveQueue. But, it
+ couldn't construct ScopedActiveMessageReceiveQueue from "const
+ ScopedActiveMessageReceiveQueue&".
+
+ * GPUProcess/GPUConnectionToWebProcess.cpp:
+ (WebKit::GPUConnectionToWebProcess::findRemoteGraphicsContextGL):
+ Use get() instead of find().
+ * Platform/IPC/ScopedActiveMessageReceiveQueue.h: Added HashTraits for it.
+
2021-11-01 Brady Eidson <beid...@apple.com>
webpushd: Add mock in-memory registration, and the WKWebsiteDataStore SPI to manage them
Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (285124 => 285125)
--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp 2021-11-01 20:16:03 UTC (rev 285124)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp 2021-11-01 20:24:37 UTC (rev 285125)
@@ -355,10 +355,7 @@
RefPtr<RemoteGraphicsContextGL> GPUConnectionToWebProcess::findRemoteGraphicsContextGL(GraphicsContextGLIdentifier identifier)
{
ASSERT(RunLoop::isMain());
- auto iter = m_remoteGraphicsContextGLMap.find(identifier);
- if (iter == m_remoteGraphicsContextGLMap.end())
- return nullptr;
- return iter->value.get();
+ return m_remoteGraphicsContextGLMap.get(identifier);
}
#endif
Modified: trunk/Source/WebKit/Platform/IPC/ScopedActiveMessageReceiveQueue.h (285124 => 285125)
--- trunk/Source/WebKit/Platform/IPC/ScopedActiveMessageReceiveQueue.h 2021-11-01 20:16:03 UTC (rev 285124)
+++ trunk/Source/WebKit/Platform/IPC/ScopedActiveMessageReceiveQueue.h 2021-11-01 20:24:37 UTC (rev 285125)
@@ -99,3 +99,12 @@
ScopedActiveMessageReceiveQueue(Ref<T>&&) -> ScopedActiveMessageReceiveQueue<T, RefPtr<T>>;
}
+
+namespace WTF {
+
+template<typename T, typename HolderType> struct HashTraits<IPC::ScopedActiveMessageReceiveQueue<T, HolderType>> : GenericHashTraits<IPC::ScopedActiveMessageReceiveQueue<T, HolderType>> {
+ using PeekType = T*;
+ static T* peek(const IPC::ScopedActiveMessageReceiveQueue<T, HolderType>& value) { return value.get(); }
+};
+
+}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes