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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp

Issue 2601983002: [IndexedDB] Adding transaction and value support to observers (Closed)
Patch Set: fixed bit check Created 3 years, 11 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
Index: third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
index fed28f8d42f6484d9681430357ac369efb277fe2..efad4a2acc51f990b342bea166a1913c0023aae6 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
@@ -40,6 +40,12 @@ void IDBObserver::observe(IDBDatabase* database,
TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
return;
}
+ if (transaction->isVersionChange()) {
+ exceptionState.throwDOMException(
+ TransactionInactiveError,
+ IDBDatabase::cannotObserveVersionChangeTransaction);
+ return;
+ }
if (!database->backend()) {
exceptionState.throwDOMException(InvalidStateError,
IDBDatabase::databaseClosedErrorMessage);
@@ -74,7 +80,7 @@ void IDBObserver::observe(IDBDatabase* database,
int32_t observerId =
database->addObserver(this, transaction->id(), options.transaction(),
- options.values(), options.noRecords(), types);
+ options.noRecords(), options.values(), types);
m_observerIds.add(observerId, database);
}

Powered by Google App Engine
This is Rietveld 408576698