Title: [158409] trunk/Source/WebCore
Revision
158409
Author
beid...@apple.com
Date
2013-10-31 17:05:53 -0700 (Thu, 31 Oct 2013)

Log Message

Split PendingDeleteCall into its own header
https://bugs.webkit.org/show_bug.cgi?id=123597

Reviewed by Beth “Okay I guess so, bro” Dakin.

* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::deleteDatabase):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:

* Modules/indexeddb/IDBPendingDeleteCall.h: Added.
(WebCore::IDBPendingDeleteCall::create):
(WebCore::IDBPendingDeleteCall::callbacks):
(WebCore::IDBPendingDeleteCall::IDBPendingDeleteCall):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (158408 => 158409)


--- trunk/Source/WebCore/ChangeLog	2013-11-01 00:01:16 UTC (rev 158408)
+++ trunk/Source/WebCore/ChangeLog	2013-11-01 00:05:53 UTC (rev 158409)
@@ -1,3 +1,23 @@
+2013-10-31  Brady Eidson  <beid...@apple.com>
+
+        Split PendingDeleteCall into its own header
+        https://bugs.webkit.org/show_bug.cgi?id=123597
+
+        Reviewed by Beth “Okay I guess so, bro” Dakin.
+
+        * GNUmakefile.list.am:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
+        (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
+        * Modules/indexeddb/IDBDatabaseBackendImpl.h:
+
+        * Modules/indexeddb/IDBPendingDeleteCall.h: Added.
+        (WebCore::IDBPendingDeleteCall::create):
+        (WebCore::IDBPendingDeleteCall::callbacks):
+        (WebCore::IDBPendingDeleteCall::IDBPendingDeleteCall):
+
 2013-10-31  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Convert some InspectorObject member variables to HashSet/HashMap

Modified: trunk/Source/WebCore/GNUmakefile.list.am (158408 => 158409)


--- trunk/Source/WebCore/GNUmakefile.list.am	2013-11-01 00:01:16 UTC (rev 158408)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2013-11-01 00:05:53 UTC (rev 158409)
@@ -1833,6 +1833,7 @@
 	Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp \
 	Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h \
 	Source/WebCore/Modules/indexeddb/IDBOperation.h \
+	Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h \
 	Source/WebCore/Modules/indexeddb/IDBPendingOpenCall.h \
 	Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.cpp \
 	Source/WebCore/Modules/indexeddb/IDBPendingTransactionMonitor.h \

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp (158408 => 158409)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2013-11-01 00:01:16 UTC (rev 158408)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp	2013-11-01 00:05:53 UTC (rev 158409)
@@ -407,7 +407,7 @@
     if (!m_pendingDeleteCalls.isEmpty() && isDeleteDatabaseBlocked())
         return;
     while (!m_pendingDeleteCalls.isEmpty()) {
-        OwnPtr<PendingDeleteCall> pendingDeleteCall = m_pendingDeleteCalls.takeFirst();
+        OwnPtr<IDBPendingDeleteCall> pendingDeleteCall = m_pendingDeleteCalls.takeFirst();
         deleteDatabaseFinal(pendingDeleteCall->callbacks());
     }
     // deleteDatabaseFinal should never re-queue calls.
@@ -549,7 +549,7 @@
         // VersionChangeEvents are received, not just set up to fire.
         // https://bugs.webkit.org/show_bug.cgi?id=71130
         callbacks->onBlocked(m_metadata.version);
-        m_pendingDeleteCalls.append(PendingDeleteCall::create(callbacks.release()));
+        m_pendingDeleteCalls.append(IDBPendingDeleteCall::create(callbacks.release()));
         return;
     }
     deleteDatabaseFinal(callbacks.release());

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h (158408 => 158409)


--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h	2013-11-01 00:01:16 UTC (rev 158408)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h	2013-11-01 00:05:53 UTC (rev 158409)
@@ -28,6 +28,7 @@
 
 #include "IDBDatabaseBackendInterface.h"
 #include "IDBMetadata.h"
+#include "IDBPendingDeleteCall.h"
 #include <stdint.h>
 #include <wtf/Deque.h>
 #include <wtf/HashMap.h>
@@ -128,24 +129,8 @@
     Deque<OwnPtr<IDBPendingOpenCall>> m_pendingOpenCalls;
     OwnPtr<IDBPendingOpenCall> m_pendingSecondHalfOpen;
 
-    class PendingDeleteCall {
-    public:
-        static PassOwnPtr<PendingDeleteCall> create(PassRefPtr<IDBCallbacks> callbacks)
-        {
-            return adoptPtr(new PendingDeleteCall(callbacks));
-        }
-        IDBCallbacks* callbacks() { return m_callbacks.get(); }
+    Deque<OwnPtr<IDBPendingDeleteCall>> m_pendingDeleteCalls;
 
-    private:
-        PendingDeleteCall(PassRefPtr<IDBCallbacks> callbacks)
-            : m_callbacks(callbacks)
-        {
-        }
-        RefPtr<IDBCallbacks> m_callbacks;
-    };
-
-    Deque<OwnPtr<PendingDeleteCall>> m_pendingDeleteCalls;
-
     typedef ListHashSet<RefPtr<IDBDatabaseCallbacks>> DatabaseCallbacksSet;
     DatabaseCallbacksSet m_databaseCallbacksSet;
 

Added: trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h (0 => 158409)


--- trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h	                        (rev 0)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h	2013-11-01 00:05:53 UTC (rev 158409)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013 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.
+ */
+
+#ifndef IDBPendingDeleteCall_h
+#define IDBPendingDeleteCall_h
+
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RefPtr.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+class IDBCallbacks;
+
+class IDBPendingDeleteCall {
+public:
+    static PassOwnPtr<IDBPendingDeleteCall> create(PassRefPtr<IDBCallbacks> callbacks)
+    {
+        return adoptPtr(new IDBPendingDeleteCall(callbacks));
+    }
+    IDBCallbacks* callbacks() { return m_callbacks.get(); }
+
+private:
+    IDBPendingDeleteCall(PassRefPtr<IDBCallbacks> callbacks)
+        : m_callbacks(callbacks)
+    {
+    }
+    RefPtr<IDBCallbacks> m_callbacks;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
+#endif // IDBPendingDeleteCall_h

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (158408 => 158409)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-11-01 00:01:16 UTC (rev 158408)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-11-01 00:05:53 UTC (rev 158409)
@@ -1755,6 +1755,7 @@
 		51ABAE1F103C1913008C5260 /* SocketStreamHandleCFNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51ABAE1D103C1913008C5260 /* SocketStreamHandleCFNet.cpp */; };
 		51ABF64D16392E2800132A7A /* LoaderStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51ABF64C16392E2800132A7A /* LoaderStrategy.cpp */; };
 		51AF503616F100F60095B2E8 /* ResourceLoaderTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 51AF503516F100F60095B2E8 /* ResourceLoaderTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		51B07A441823248B00AA8D1A /* IDBPendingDeleteCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B07A431823248B00AA8D1A /* IDBPendingDeleteCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		51B2417B0D931F3F00E83F5C /* LegacyWebArchiveMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */; };
 		51BE37E00DAEE00E001085FC /* StorageArea.h in Headers */ = {isa = PBXBuildFile; fileRef = 51BE37DE0DAEE00E001085FC /* StorageArea.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		51C0AA390F2AA10A001648C2 /* CachedFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C0AA380F2AA10A001648C2 /* CachedFrame.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8380,6 +8381,7 @@
 		51ABAE1D103C1913008C5260 /* SocketStreamHandleCFNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketStreamHandleCFNet.cpp; sourceTree = "<group>"; };
 		51ABF64C16392E2800132A7A /* LoaderStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoaderStrategy.cpp; sourceTree = "<group>"; };
 		51AF503516F100F60095B2E8 /* ResourceLoaderTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderTypes.h; sourceTree = "<group>"; };
+		51B07A431823248B00AA8D1A /* IDBPendingDeleteCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBPendingDeleteCall.h; sourceTree = "<group>"; };
 		51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyWebArchiveMac.mm; sourceTree = "<group>"; };
 		51BE37DE0DAEE00E001085FC /* StorageArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageArea.h; sourceTree = "<group>"; };
 		51C0AA380F2AA10A001648C2 /* CachedFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFrame.h; sourceTree = "<group>"; };
@@ -16851,6 +16853,7 @@
 				51D7199D181106E00016DC51 /* IDBOpenDBRequest.h */,
 				51D7199E181106E00016DC51 /* IDBOpenDBRequest.idl */,
 				512EA9BD18202857001D01E0 /* IDBOperation.h */,
+				51B07A431823248B00AA8D1A /* IDBPendingDeleteCall.h */,
 				512EA9BB181F2EE0001D01E0 /* IDBPendingOpenCall.h */,
 				51D7199F181106E00016DC51 /* IDBPendingTransactionMonitor.cpp */,
 				51D719A0181106E00016DC51 /* IDBPendingTransactionMonitor.h */,
@@ -22017,6 +22020,7 @@
 				A80E6D0C0A1989CA007FB8C5 /* CSSStyleRule.h in Headers */,
 				A8EA80070A19516E00A8EF5F /* CSSStyleSheet.h in Headers */,
 				FC54D05716A7673100575E4D /* CSSSupportsRule.h in Headers */,
+				51B07A441823248B00AA8D1A /* IDBPendingDeleteCall.h in Headers */,
 				BC80C9880CD294EE00A0B7B3 /* CSSTimingFunctionValue.h in Headers */,
 				A882DA231593848D000115ED /* CSSToStyleMap.h in Headers */,
 				371F53E90D2704F900ECE0D5 /* CSSUnicodeRangeValue.h in Headers */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to