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

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

Issue 2808763007: IndexedDB: Clean up boilerplate when throwing TransactionInactiveError (Closed)
Patch Set: Created 3 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
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 0ed096e256de9294fdcf7e1ea5b99ca237af376c..42874b9ab8c6a4e1562c93a5f9f06cc6b24806a6 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
@@ -29,16 +29,9 @@ void IDBObserver::observe(IDBDatabase* database,
IDBTransaction* transaction,
const IDBObserverInit& options,
ExceptionState& exception_state) {
- if (transaction->IsFinished() || transaction->IsFinishing()) {
- exception_state.ThrowDOMException(
- kTransactionInactiveError,
- IDBDatabase::kTransactionFinishedErrorMessage);
- return;
- }
if (!transaction->IsActive()) {
- exception_state.ThrowDOMException(
- kTransactionInactiveError,
- IDBDatabase::kTransactionInactiveErrorMessage);
+ exception_state.ThrowDOMException(kTransactionInactiveError,
+ transaction->InactiveErrorMessage());
return;
}
if (transaction->IsVersionChange()) {

Powered by Google App Engine
This is Rietveld 408576698