fix(webkit): use HashMap traits that allow 0 as key (#255)

This commit is contained in:
Yury Semikhatsky 2019-12-16 10:51:43 -07:00 committed by Dmitry Gozman
parent a8f9c627f1
commit ffd45a3783
2 changed files with 5 additions and 4 deletions

View File

@ -1 +1 @@
1036 1037

View File

@ -4657,7 +4657,7 @@ index 9693809e34e..b45a4e7aa61 100644
if (isInAcceleratedCompositingMode()) { if (isInAcceleratedCompositingMode()) {
ASSERT(!m_backingStore); ASSERT(!m_backingStore);
diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
index d7695088e7c..4fe533572b6 100644 index d7695088e7c..fd0e1db93b4 100644
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h --- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h +++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
@ -4676,11 +4676,12 @@ index d7695088e7c..4fe533572b6 100644
private: private:
// DrawingAreaProxy // DrawingAreaProxy
@@ -126,6 +128,8 @@ private: @@ -126,6 +128,9 @@ private:
// For a new Drawing Area don't draw anything until the WebProcess has sent over the first content. // For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
bool m_hasReceivedFirstUpdate { false }; bool m_hasReceivedFirstUpdate { false };
+ HashMap<uint64_t, Function<void ()>> m_callbacks; + using ResizeCallbackMap = HashMap<uint64_t, Function<void ()>, WTF::IntHash<uint64_t>, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>>;
+ ResizeCallbackMap m_callbacks;
+ +
#if !PLATFORM(WPE) #if !PLATFORM(WPE)
bool m_isBackingStoreDiscardable { true }; bool m_isBackingStoreDiscardable { true };