| Index: third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
|
| diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
|
| index 87b075a457d29c767b6670981cd79b4e76c8a3b9..c4157b0382229b02758eed4fcb9e22d44ab2dccd 100644
|
| --- a/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
|
| +++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
|
| @@ -90,11 +90,14 @@ DEFINE_TRACE(IDBRequest)
|
| ScriptValue IDBRequest::result(ExceptionState& exceptionState)
|
| {
|
| if (m_readyState != DONE) {
|
| + // Must throw if returning an empty value. Message is arbitrary since it will never be seen.
|
| exceptionState.throwDOMException(InvalidStateError, IDBDatabase::requestNotFinishedErrorMessage);
|
| return ScriptValue();
|
| }
|
| - if (m_contextStopped || !getExecutionContext())
|
| + if (m_contextStopped || !getExecutionContext()) {
|
| + exceptionState.throwDOMException(InvalidStateError, IDBDatabase::databaseClosedErrorMessage);
|
| return ScriptValue();
|
| + }
|
| m_resultDirty = false;
|
| ScriptValue value = ScriptValue::from(m_scriptState.get(), m_result);
|
| return value;
|
|
|