Title: [194468] trunk/Source/WebCore
Revision
194468
Author
[email protected]
Date
2015-12-31 13:29:51 -0800 (Thu, 31 Dec 2015)

Log Message

Review feedback followup for:
Modern IDB: Only fire blocked events after all open connections have handled their versionchange events.
https://bugs.webkit.org/show_bug.cgi?id=152593

Suggested by Andy Estes.

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::dispatchEvent): Use downcast instead of static_cast.

Add traits to support downcast<>:
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
(isType):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (194467 => 194468)


--- trunk/Source/WebCore/ChangeLog	2015-12-31 21:09:07 UTC (rev 194467)
+++ trunk/Source/WebCore/ChangeLog	2015-12-31 21:29:51 UTC (rev 194468)
@@ -1,3 +1,18 @@
+2015-12-31  Brady Eidson  <[email protected]>
+
+        Review feedback followup for:
+        Modern IDB: Only fire blocked events after all open connections have handled their versionchange events.
+        https://bugs.webkit.org/show_bug.cgi?id=152593
+
+        Suggested by Andy Estes.
+
+        * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
+        (WebCore::IDBClient::IDBDatabase::dispatchEvent): Use downcast instead of static_cast.
+
+        Add traits to support downcast<>:
+        * Modules/indexeddb/client/IDBVersionChangeEventImpl.h:
+        (isType):
+
 2015-12-31  Zalan Bujtas  <[email protected]>
 
         Move decoration context setup calls to InlineTextBox::paintDecoration.

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (194467 => 194468)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp	2015-12-31 21:09:07 UTC (rev 194467)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp	2015-12-31 21:29:51 UTC (rev 194468)
@@ -379,7 +379,7 @@
     bool result = WebCore::IDBDatabase::dispatchEvent(event);
 
     if (event.isVersionChangeEvent() && event.type() == eventNames().versionchangeEvent)
-        serverConnection().didFireVersionChangeEvent(m_databaseConnectionIdentifier, static_cast<IDBVersionChangeEvent&>(event).requestIdentifier());
+        serverConnection().didFireVersionChangeEvent(m_databaseConnectionIdentifier, downcast<IDBVersionChangeEvent>(event).requestIdentifier());
 
     return result;
 }

Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h (194467 => 194468)


--- trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h	2015-12-31 21:09:07 UTC (rev 194467)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBVersionChangeEventImpl.h	2015-12-31 21:29:51 UTC (rev 194468)
@@ -65,5 +65,9 @@
 } // namespace IDBClient
 } // namespace WebCore
 
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::IDBClient::IDBVersionChangeEvent)
+    static bool isType(const WebCore::Event& event) { return event.isVersionChangeEvent(); }
+SPECIALIZE_TYPE_TRAITS_END()
+
 #endif // ENABLE(INDEXED_DATABASE)
 #endif // IDBVersionChangeEventImpl_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to