Title: [146225] trunk/Source/WebCore
- Revision
- 146225
- Author
- [email protected]
- Date
- 2013-03-19 11:23:51 -0700 (Tue, 19 Mar 2013)
Log Message
IndexedDB: Use integer plumbing for deleteDatabase onVersionChange calls
https://bugs.webkit.org/show_bug.cgi?id=112715
Reviewed by Tony Chang.
When deleteDatabase on the back-end needs to send the front-end an
onVersionChange notification it does so using the string overload. That's
the only remaining use of that overload and we'd like to delete it. Switch
to using the integer overload, with an already defined special value.
This will unblock http://wkbug.com/112712 to delete the dead code.
No new tests - no functional change.
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::onVersionChange): Map NoIntVersion to null.
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::deleteDatabase): Call integer overload.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (146224 => 146225)
--- trunk/Source/WebCore/ChangeLog 2013-03-19 18:20:35 UTC (rev 146224)
+++ trunk/Source/WebCore/ChangeLog 2013-03-19 18:23:51 UTC (rev 146225)
@@ -1,3 +1,23 @@
+2013-03-19 Joshua Bell <[email protected]>
+
+ IndexedDB: Use integer plumbing for deleteDatabase onVersionChange calls
+ https://bugs.webkit.org/show_bug.cgi?id=112715
+
+ Reviewed by Tony Chang.
+
+ When deleteDatabase on the back-end needs to send the front-end an
+ onVersionChange notification it does so using the string overload. That's
+ the only remaining use of that overload and we'd like to delete it. Switch
+ to using the integer overload, with an already defined special value.
+ This will unblock http://wkbug.com/112712 to delete the dead code.
+
+ No new tests - no functional change.
+
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::onVersionChange): Map NoIntVersion to null.
+ * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+ (WebCore::IDBDatabaseBackendImpl::deleteDatabase): Call integer overload.
+
2013-03-19 Terry Anderson <[email protected]>
Hover effects from a GestureTapDown are dismissed by a GestureTap on the hover element
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp (146224 => 146225)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2013-03-19 18:20:35 UTC (rev 146224)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp 2013-03-19 18:23:51 UTC (rev 146225)
@@ -307,7 +307,8 @@
if (m_closePending)
return;
- enqueueEvent(IDBVersionChangeEvent::create(IDBAny::create(oldVersion), IDBAny::create(newVersion), eventNames().versionchangeEvent));
+ RefPtr<IDBAny> newVersionAny = newVersion == IDBDatabaseMetadata::NoIntVersion ? IDBAny::createNull() : IDBAny::create(newVersion);
+ enqueueEvent(IDBVersionChangeEvent::create(IDBAny::create(oldVersion), newVersionAny.release(), eventNames().versionchangeEvent));
}
void IDBDatabase::onVersionChange(const String& newVersion)
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp (146224 => 146225)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp 2013-03-19 18:20:35 UTC (rev 146224)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp 2013-03-19 18:23:51 UTC (rev 146225)
@@ -1281,7 +1281,7 @@
if (isDeleteDatabaseBlocked()) {
for (DatabaseCallbacksSet::const_iterator it = m_databaseCallbacksSet.begin(); it != m_databaseCallbacksSet.end(); ++it) {
// Front end ensures the event is not fired at connections that have closePending set.
- (*it)->onVersionChange(NoStringVersion);
+ (*it)->onVersionChange(m_metadata.intVersion, IDBDatabaseMetadata::NoIntVersion);
}
// FIXME: Only fire onBlocked if there are open connections after the
// VersionChangeEvents are received, not just set up to fire.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes