Diff
Modified: trunk/Source/WebKit/CMakeLists.txt (223957 => 223958)
--- trunk/Source/WebKit/CMakeLists.txt 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/CMakeLists.txt 2017-10-25 17:19:41 UTC (rev 223958)
@@ -181,6 +181,7 @@
Shared/ShareableBitmap.cpp
Shared/ShareableResource.cpp
Shared/SharedStringHashStore.cpp
+ Shared/SharedStringHashTableReadOnly.cpp
Shared/SharedStringHashTable.cpp
Shared/StatisticsData.cpp
Shared/UpdateInfo.cpp
Modified: trunk/Source/WebKit/ChangeLog (223957 => 223958)
--- trunk/Source/WebKit/ChangeLog 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/ChangeLog 2017-10-25 17:19:41 UTC (rev 223958)
@@ -1,3 +1,40 @@
+2017-10-25 Chris Dumez <[email protected]>
+
+ Make SharedStringHashTable less error prone
+ https://bugs.webkit.org/show_bug.cgi?id=178764
+
+ Reviewed by Youenn Fablet.
+
+ SharedStringHashTable is backed by SharedMemory and this SharedMemory
+ may be readonly (and is when used in the WebContent process). As a result,
+ some of the operations on SharedStringHashTable that write to this shared
+ memory will crash if called and the SharedMemory is readonly.
+
+ To make this less error prone, introduce a new SharedStringHashTableReadOnly
+ base class for SharedStringHashTable and only keep the operations that
+ write to the shared memory on SharedStringHashTableReadOnly (namely, add() /
+ remove() / clear(). Update VisitedLinkTableController and WebSWOriginTable
+ to use SharedStringHashTableReadOnly since they are instantiated in the
+ WebContent process and use readonly shared memory.
+
+ * Shared/SharedStringHashTable.cpp:
+ (WebKit::SharedStringHashTableReadOnly::SharedStringHashTableReadOnly):
+ (WebKit::SharedStringHashTableReadOnly::~SharedStringHashTableReadOnly):
+ (WebKit::SharedStringHashTableReadOnly::setSharedMemory):
+ (WebKit::doubleHash):
+ (WebKit::SharedStringHashTableReadOnly::contains const):
+ (WebKit::SharedStringHashTableReadOnly::findSlot const):
+ (WebKit::SharedStringHashTable::SharedStringHashTable):
+ (WebKit::SharedStringHashTable::~SharedStringHashTable):
+ (WebKit::SharedStringHashTable::add):
+ (WebKit::SharedStringHashTable::remove):
+ (WebKit::SharedStringHashTable::clear):
+ * Shared/SharedStringHashTable.h:
+ * WebProcess/Storage/WebSWOriginTable.h:
+ * WebProcess/WebPage/VisitedLinkTableController.cpp:
+ (WebKit::VisitedLinkTableController::removeAllVisitedLinks):
+ * WebProcess/WebPage/VisitedLinkTableController.h:
+
2017-10-25 Adrian Perez de Castro <[email protected]>
[WPE] Remove GLib API functions which use Cairo
Modified: trunk/Source/WebKit/Shared/SharedStringHashTable.cpp (223957 => 223958)
--- trunk/Source/WebKit/Shared/SharedStringHashTable.cpp 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/Shared/SharedStringHashTable.cpp 2017-10-25 17:19:41 UTC (rev 223958)
@@ -28,10 +28,10 @@
#include "SharedMemory.h"
+namespace WebKit {
+
using namespace WebCore;
-namespace WebKit {
-
SharedStringHashTable::SharedStringHashTable()
{
}
@@ -40,39 +40,6 @@
{
}
-#if !ASSERT_DISABLED
-static inline bool isPowerOf2(unsigned v)
-{
- // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html
-
- return !(v & (v - 1)) && v;
-}
-#endif
-
-void SharedStringHashTable::setSharedMemory(Ref<SharedMemory>&& sharedMemory)
-{
- m_sharedMemory = WTFMove(sharedMemory);
-
- ASSERT(m_sharedMemory);
- ASSERT(!(m_sharedMemory->size() % sizeof(SharedStringHash)));
-
- m_table = static_cast<SharedStringHash*>(m_sharedMemory->data());
- m_tableSize = m_sharedMemory->size() / sizeof(SharedStringHash);
- ASSERT(isPowerOf2(m_tableSize));
-
- m_tableSizeMask = m_tableSize - 1;
-}
-
-static inline unsigned doubleHash(unsigned key)
-{
- key = ~key + (key >> 23);
- key ^= (key << 12);
- key ^= (key >> 7);
- key ^= (key << 2);
- key ^= (key >> 20);
- return key;
-}
-
bool SharedStringHashTable::add(SharedStringHash sharedStringHash)
{
auto* slot = findSlot(sharedStringHash);
@@ -96,40 +63,6 @@
return true;
}
-bool SharedStringHashTable::contains(SharedStringHash sharedStringHash) const
-{
- auto* slot = findSlot(sharedStringHash);
- return slot && *slot;
-}
-
-SharedStringHash* SharedStringHashTable::findSlot(SharedStringHash sharedStringHash) const
-{
- if (!m_sharedMemory)
- return nullptr;
-
- int k = 0;
- SharedStringHash* table = m_table;
- int sizeMask = m_tableSizeMask;
- unsigned h = static_cast<unsigned>(sharedStringHash);
- int i = h & sizeMask;
-
- SharedStringHash* entry;
- while (1) {
- entry = table + i;
-
- // Check if we've reached the end of the table.
- if (!*entry)
- return entry;
-
- if (*entry == sharedStringHash)
- return entry;
-
- if (!k)
- k = 1 | doubleHash(h);
- i = (i + k) & sizeMask;
- }
-}
-
void SharedStringHashTable::clear()
{
if (!m_sharedMemory)
@@ -136,10 +69,7 @@
return;
memset(m_sharedMemory->data(), 0, m_sharedMemory->size());
- m_table = nullptr;
- m_tableSize = 0;
- m_tableSizeMask = 0;
- m_sharedMemory = nullptr;
+ setSharedMemory(nullptr);
}
} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/SharedStringHashTable.h (223957 => 223958)
--- trunk/Source/WebKit/Shared/SharedStringHashTable.h 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/Shared/SharedStringHashTable.h 2017-10-25 17:19:41 UTC (rev 223958)
@@ -25,36 +25,18 @@
#pragma once
-#include <WebCore/SharedStringHash.h>
-#include <wtf/RefPtr.h>
+#include "SharedStringHashTableReadOnly.h"
namespace WebKit {
-class SharedMemory;
-
-class SharedStringHashTable {
+class SharedStringHashTable : public SharedStringHashTableReadOnly {
public:
SharedStringHashTable();
~SharedStringHashTable();
- void setSharedMemory(Ref<SharedMemory>&&);
-
- // Can only be called if the underlying shared memory is in read / write mode.
bool add(WebCore::SharedStringHash);
bool remove(WebCore::SharedStringHash);
-
- bool contains(WebCore::SharedStringHash) const;
-
- SharedMemory* sharedMemory() const { return m_sharedMemory.get(); }
void clear();
-
-private:
- RefPtr<SharedMemory> m_sharedMemory;
- WebCore::SharedStringHash* findSlot(WebCore::SharedStringHash) const;
-
- unsigned m_tableSize { 0 };
- unsigned m_tableSizeMask { 0 };
- WebCore::SharedStringHash* m_table { nullptr };
};
}
Copied: trunk/Source/WebKit/Shared/SharedStringHashTableReadOnly.cpp (from rev 223957, trunk/Source/WebKit/Shared/SharedStringHashTable.cpp) (0 => 223958)
--- trunk/Source/WebKit/Shared/SharedStringHashTableReadOnly.cpp (rev 0)
+++ trunk/Source/WebKit/Shared/SharedStringHashTableReadOnly.cpp 2017-10-25 17:19:41 UTC (rev 223958)
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SharedStringHashTableReadOnly.h"
+
+#include "SharedMemory.h"
+
+namespace WebKit {
+
+using namespace WebCore;
+
+#if !ASSERT_DISABLED
+static inline bool isPowerOf2(unsigned v)
+{
+ // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html
+
+ return !(v & (v - 1)) && v;
+}
+#endif
+
+static inline unsigned doubleHash(unsigned key)
+{
+ key = ~key + (key >> 23);
+ key ^= (key << 12);
+ key ^= (key >> 7);
+ key ^= (key << 2);
+ key ^= (key >> 20);
+ return key;
+}
+
+SharedStringHashTableReadOnly::SharedStringHashTableReadOnly()
+{
+}
+
+SharedStringHashTableReadOnly::~SharedStringHashTableReadOnly()
+{
+}
+
+void SharedStringHashTableReadOnly::setSharedMemory(RefPtr<SharedMemory>&& sharedMemory)
+{
+ m_sharedMemory = WTFMove(sharedMemory);
+
+ if (m_sharedMemory) {
+ ASSERT(!(m_sharedMemory->size() % sizeof(SharedStringHash)));
+ m_table = static_cast<SharedStringHash*>(m_sharedMemory->data());
+ m_tableSize = m_sharedMemory->size() / sizeof(SharedStringHash);
+ ASSERT(isPowerOf2(m_tableSize));
+ m_tableSizeMask = m_tableSize - 1;
+ } else {
+ m_table = nullptr;
+ m_tableSize = 0;
+ m_tableSizeMask = 0;
+ }
+}
+
+bool SharedStringHashTableReadOnly::contains(SharedStringHash sharedStringHash) const
+{
+ auto* slot = findSlot(sharedStringHash);
+ return slot && *slot;
+}
+
+SharedStringHash* SharedStringHashTableReadOnly::findSlot(SharedStringHash sharedStringHash) const
+{
+ if (!m_sharedMemory)
+ return nullptr;
+
+ int k = 0;
+ SharedStringHash* table = m_table;
+ int sizeMask = m_tableSizeMask;
+ unsigned h = static_cast<unsigned>(sharedStringHash);
+ int i = h & sizeMask;
+
+ SharedStringHash* entry;
+ while (1) {
+ entry = table + i;
+
+ // Check if we've reached the end of the table.
+ if (!*entry)
+ return entry;
+
+ if (*entry == sharedStringHash)
+ return entry;
+
+ if (!k)
+ k = 1 | doubleHash(h);
+ i = (i + k) & sizeMask;
+ }
+}
+
+} // namespace WebKit
Copied: trunk/Source/WebKit/Shared/SharedStringHashTableReadOnly.h (from rev 223957, trunk/Source/WebKit/Shared/SharedStringHashTable.h) (0 => 223958)
--- trunk/Source/WebKit/Shared/SharedStringHashTableReadOnly.h (rev 0)
+++ trunk/Source/WebKit/Shared/SharedStringHashTableReadOnly.h 2017-10-25 17:19:41 UTC (rev 223958)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <WebCore/SharedStringHash.h>
+#include <wtf/RefPtr.h>
+
+namespace WebKit {
+
+class SharedMemory;
+
+class SharedStringHashTableReadOnly {
+public:
+ SharedStringHashTableReadOnly();
+ ~SharedStringHashTableReadOnly();
+
+ bool contains(WebCore::SharedStringHash) const;
+
+ SharedMemory* sharedMemory() const { return m_sharedMemory.get(); }
+ void setSharedMemory(RefPtr<SharedMemory>&&);
+
+protected:
+ WebCore::SharedStringHash* findSlot(WebCore::SharedStringHash) const;
+
+ RefPtr<SharedMemory> m_sharedMemory;
+ unsigned m_tableSize { 0 };
+ unsigned m_tableSizeMask { 0 };
+ WebCore::SharedStringHash* m_table { nullptr };
+};
+
+} // namespace WebKit
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (223957 => 223958)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-10-25 17:19:41 UTC (rev 223958)
@@ -1401,6 +1401,8 @@
83EE575C1DB7D61100C74C50 /* WebValidationMessageClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 83EE575A1DB7D60600C74C50 /* WebValidationMessageClient.h */; };
83F1A0791F96E7790045B94E /* WebSWOriginTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83F1A0771F96E7700045B94E /* WebSWOriginTable.cpp */; };
83F1A07A1F96E7790045B94E /* WebSWOriginTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F1A0781F96E7710045B94E /* WebSWOriginTable.h */; };
+ 83F9644D1FA0F76E00C47750 /* SharedStringHashTableReadOnly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83F9644B1FA0F76200C47750 /* SharedStringHashTableReadOnly.cpp */; };
+ 83F9644E1FA0F76E00C47750 /* SharedStringHashTableReadOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F9644C1FA0F76300C47750 /* SharedStringHashTableReadOnly.h */; };
84477853176FCC0800CDC7BB /* InjectedBundleHitTestResultMediaType.h in Headers */ = {isa = PBXBuildFile; fileRef = 84477851176FCAC100CDC7BB /* InjectedBundleHitTestResultMediaType.h */; };
868160D0187645570021E79D /* WindowServerConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 868160CF187645370021E79D /* WindowServerConnection.mm */; };
86E67A251910B9D100004AB7 /* ProcessThrottler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86E67A21190F411800004AB7 /* ProcessThrottler.h */; };
@@ -3719,7 +3721,7 @@
7CDE73A01F9DA37B00390312 /* WebPreferencesDefinitionsBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesDefinitionsBase.h; sourceTree = "<group>"; };
7CDE73A11F9DA41400390312 /* GeneratePreferences.rb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.ruby; path = GeneratePreferences.rb; sourceTree = "<group>"; };
7CDE73A21F9DA59700390312 /* PreferencesTemplates */ = {isa = PBXFileReference; lastKnownFileType = folder; path = PreferencesTemplates; sourceTree = "<group>"; };
- 7CDE73A31F9DAB6500390312 /* WebPreferencesDefinitions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebPreferencesDefinitions.h; path = WebPreferencesDefinitions.h; sourceTree = "<group>"; };
+ 7CDE73A31F9DAB6500390312 /* WebPreferencesDefinitions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebPreferencesDefinitions.h; sourceTree = "<group>"; };
7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APILegacyContextHistoryClient.h; sourceTree = "<group>"; };
7CE4D2151A49148400C7F152 /* WebProcessPoolCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessPoolCocoa.mm; sourceTree = "<group>"; };
7CE4D2171A4914A300C7F152 /* WebProcessPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessPool.cpp; sourceTree = "<group>"; };
@@ -3779,6 +3781,8 @@
83EE575A1DB7D60600C74C50 /* WebValidationMessageClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebValidationMessageClient.h; sourceTree = "<group>"; };
83F1A0771F96E7700045B94E /* WebSWOriginTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSWOriginTable.cpp; sourceTree = "<group>"; };
83F1A0781F96E7710045B94E /* WebSWOriginTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSWOriginTable.h; sourceTree = "<group>"; };
+ 83F9644B1FA0F76200C47750 /* SharedStringHashTableReadOnly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedStringHashTableReadOnly.cpp; sourceTree = "<group>"; };
+ 83F9644C1FA0F76300C47750 /* SharedStringHashTableReadOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedStringHashTableReadOnly.h; sourceTree = "<group>"; };
84477851176FCAC100CDC7BB /* InjectedBundleHitTestResultMediaType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleHitTestResultMediaType.h; sourceTree = "<group>"; };
868160CD18763D4B0021E79D /* WindowServerConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WindowServerConnection.h; sourceTree = "<group>"; };
868160CF187645370021E79D /* WindowServerConnection.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowServerConnection.mm; sourceTree = "<group>"; };
@@ -5072,6 +5076,8 @@
8313F7E91F7DAE0300B944EB /* SharedStringHashStore.h */,
8313F7E81F7DAE0300B944EB /* SharedStringHashTable.cpp */,
8313F7E71F7DAE0300B944EB /* SharedStringHashTable.h */,
+ 83F9644B1FA0F76200C47750 /* SharedStringHashTableReadOnly.cpp */,
+ 83F9644C1FA0F76300C47750 /* SharedStringHashTableReadOnly.h */,
5272B2881406985D0096A5D0 /* StatisticsData.cpp */,
5272B2891406985D0096A5D0 /* StatisticsData.h */,
1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */,
@@ -8834,6 +8840,7 @@
CD4B4D9D1E765E0000D27092 /* SharedRingBufferStorage.h in Headers */,
8313F7EC1F7DAE0800B944EB /* SharedStringHashStore.h in Headers */,
8313F7EE1F7DAE0800B944EB /* SharedStringHashTable.h in Headers */,
+ 83F9644E1FA0F76E00C47750 /* SharedStringHashTableReadOnly.h in Headers */,
2DAF06D618BD1A470081CEB1 /* SmartMagnificationController.h in Headers */,
2DE6943E18BD2A68005C15E5 /* SmartMagnificationControllerMessages.h in Headers */,
5272B28B1406985D0096A5D0 /* StatisticsData.h in Headers */,
@@ -10429,6 +10436,7 @@
CD4B4D9C1E765E0000D27092 /* SharedRingBufferStorage.cpp in Sources */,
8313F7EB1F7DAE0800B944EB /* SharedStringHashStore.cpp in Sources */,
8313F7ED1F7DAE0800B944EB /* SharedStringHashTable.cpp in Sources */,
+ 83F9644D1FA0F76E00C47750 /* SharedStringHashTableReadOnly.cpp in Sources */,
2DAF06D718BD1A470081CEB1 /* SmartMagnificationController.mm in Sources */,
2DE6943D18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp in Sources */,
5272B28A1406985D0096A5D0 /* StatisticsData.cpp in Sources */,
Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWOriginTable.h (223957 => 223958)
--- trunk/Source/WebKit/WebProcess/Storage/WebSWOriginTable.h 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWOriginTable.h 2017-10-25 17:19:41 UTC (rev 223958)
@@ -28,7 +28,7 @@
#if ENABLE(SERVICE_WORKER)
#include "SharedMemory.h"
-#include "SharedStringHashTable.h"
+#include "SharedStringHashTableReadOnly.h"
namespace WebCore {
class SecurityOrigin;
@@ -44,7 +44,7 @@
void setSharedMemory(const SharedMemory::Handle&);
private:
- SharedStringHashTable m_serviceWorkerOriginTable;
+ SharedStringHashTableReadOnly m_serviceWorkerOriginTable;
};
} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp (223957 => 223958)
--- trunk/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.cpp 2017-10-25 17:19:41 UTC (rev 223958)
@@ -112,7 +112,7 @@
void VisitedLinkTableController::removeAllVisitedLinks()
{
- m_visitedLinkTable.clear();
+ m_visitedLinkTable.setSharedMemory(nullptr);
invalidateStylesForAllLinks();
}
Modified: trunk/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h (223957 => 223958)
--- trunk/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h 2017-10-25 17:18:13 UTC (rev 223957)
+++ trunk/Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h 2017-10-25 17:19:41 UTC (rev 223958)
@@ -27,7 +27,7 @@
#include "MessageReceiver.h"
#include "SharedMemory.h"
-#include "SharedStringHashTable.h"
+#include "SharedStringHashTableReadOnly.h"
#include <WebCore/VisitedLinkStore.h>
namespace WebKit {
@@ -53,7 +53,7 @@
void removeAllVisitedLinks();
uint64_t m_identifier;
- SharedStringHashTable m_visitedLinkTable;
+ SharedStringHashTableReadOnly m_visitedLinkTable;
};
} // namespace WebKit