Title: [248794] trunk/Source/WebKit
- Revision
- 248794
- Author
- cdu...@apple.com
- Date
- 2019-08-16 13:56:00 -0700 (Fri, 16 Aug 2019)
Log Message
LocalStorageDatabase does not need to subclass ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=200822
Reviewed by Geoff Garen.
LocalStorageDatabase does not need to subclass ThreadSafeRefCounted, it is only ref'd / deref'd by the StorageArea
on the com.apple.WebKit.WebStorage serial WorkQueue, and in LocalStorageDatabase::scheduleDatabaseUpdate() on the
same WorkQueue.
* NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::LocalStorageDatabase):
(WebKit::LocalStorageDatabase::~LocalStorageDatabase):
* NetworkProcess/WebStorage/LocalStorageDatabase.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (248793 => 248794)
--- trunk/Source/WebKit/ChangeLog 2019-08-16 20:44:37 UTC (rev 248793)
+++ trunk/Source/WebKit/ChangeLog 2019-08-16 20:56:00 UTC (rev 248794)
@@ -1,5 +1,21 @@
2019-08-16 Chris Dumez <cdu...@apple.com>
+ LocalStorageDatabase does not need to subclass ThreadSafeRefCounted
+ https://bugs.webkit.org/show_bug.cgi?id=200822
+
+ Reviewed by Geoff Garen.
+
+ LocalStorageDatabase does not need to subclass ThreadSafeRefCounted, it is only ref'd / deref'd by the StorageArea
+ on the com.apple.WebKit.WebStorage serial WorkQueue, and in LocalStorageDatabase::scheduleDatabaseUpdate() on the
+ same WorkQueue.
+
+ * NetworkProcess/WebStorage/LocalStorageDatabase.cpp:
+ (WebKit::LocalStorageDatabase::LocalStorageDatabase):
+ (WebKit::LocalStorageDatabase::~LocalStorageDatabase):
+ * NetworkProcess/WebStorage/LocalStorageDatabase.h:
+
+2019-08-16 Chris Dumez <cdu...@apple.com>
+
Many WebStorage classes do not need to subclass ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=200821
Modified: trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabase.cpp (248793 => 248794)
--- trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabase.cpp 2019-08-16 20:44:37 UTC (rev 248793)
+++ trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabase.cpp 2019-08-16 20:56:00 UTC (rev 248794)
@@ -61,10 +61,12 @@
, m_didScheduleDatabaseUpdate(false)
, m_shouldClearItems(false)
{
+ ASSERT(!RunLoop::isMain());
}
LocalStorageDatabase::~LocalStorageDatabase()
{
+ ASSERT(!RunLoop::isMain());
ASSERT(m_isClosed);
}
Modified: trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabase.h (248793 => 248794)
--- trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabase.h 2019-08-16 20:44:37 UTC (rev 248793)
+++ trunk/Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabase.h 2019-08-16 20:56:00 UTC (rev 248794)
@@ -29,8 +29,7 @@
#include <WebCore/SecurityOriginData.h>
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
-#include <wtf/RefPtr.h>
-#include <wtf/ThreadSafeRefCounted.h>
+#include <wtf/RefCounted.h>
#include <wtf/WorkQueue.h>
namespace WebCore {
@@ -43,7 +42,7 @@
class LocalStorageDatabaseTracker;
-class LocalStorageDatabase : public ThreadSafeRefCounted<LocalStorageDatabase> {
+class LocalStorageDatabase : public RefCounted<LocalStorageDatabase> {
public:
static Ref<LocalStorageDatabase> create(Ref<WorkQueue>&&, Ref<LocalStorageDatabaseTracker>&&, const WebCore::SecurityOriginData&);
~LocalStorageDatabase();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes