Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1340)

Unified Diff: Source/modules/indexeddb/IDBOpenDBRequest.cpp

Issue 235493003: deleteDatabase() success should be IDBVersionChangeEvent [Blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove tests for landing Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/indexeddb/IDBOpenDBRequest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBOpenDBRequest.cpp
diff --git a/Source/modules/indexeddb/IDBOpenDBRequest.cpp b/Source/modules/indexeddb/IDBOpenDBRequest.cpp
index 45eecc28ba4b98611a1a511dfb90aa1c506b23a2..1a84d59fc863c11cf90babf4cd86c35579bb5b54 100644
--- a/Source/modules/indexeddb/IDBOpenDBRequest.cpp
+++ b/Source/modules/indexeddb/IDBOpenDBRequest.cpp
@@ -135,6 +135,19 @@ void IDBOpenDBRequest::onSuccess(PassOwnPtr<WebIDBDatabase> backend, const IDBDa
enqueueEvent(Event::create(EventTypeNames::success));
}
+void IDBOpenDBRequest::onSuccess(int64_t oldVersion)
+{
+ IDB_TRACE("IDBOpenDBRequest::onSuccess()");
+ if (!shouldEnqueueEvent())
+ return;
+ if (oldVersion == IDBDatabaseMetadata::NoIntVersion) {
+ // This database hasn't had an integer version before.
+ oldVersion = IDBDatabaseMetadata::DefaultIntVersion;
+ }
+ setResult(IDBAny::createUndefined());
+ enqueueEvent(IDBVersionChangeEvent::create(EventTypeNames::success, oldVersion, Nullable<unsigned long long>()));
+}
+
bool IDBOpenDBRequest::shouldEnqueueEvent() const
{
if (m_contextStopped || !executionContext())
« no previous file with comments | « Source/modules/indexeddb/IDBOpenDBRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698