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); |
} |