Index: third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
index 3b290565d2e0e5a27684653c0313505b677d60ce..42a78671de8fa52ce90c7de31c11d6b623c4d6ba 100644 |
--- a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp |
@@ -485,6 +485,22 @@ ExecutionContext* IDBTransaction::GetExecutionContext() const { |
return ContextLifecycleObserver::GetExecutionContext(); |
} |
+const char* IDBTransaction::InactiveErrorMessage() const { |
+ switch (state_) { |
+ case kActive: |
+ // Callers should check !IsActive() before calling. |
+ NOTREACHED(); |
+ return nullptr; |
+ case kInactive: |
+ return IDBDatabase::kTransactionInactiveErrorMessage; |
+ case kFinishing: |
+ case kFinished: |
+ return IDBDatabase::kTransactionFinishedErrorMessage; |
+ } |
+ NOTREACHED(); |
+ return nullptr; |
+} |
+ |
DispatchEventResult IDBTransaction::DispatchEventInternal(Event* event) { |
IDB_TRACE("IDBTransaction::dispatchEvent"); |
if (!GetExecutionContext()) { |