| Index: Source/modules/indexeddb/IDBCursor.cpp
|
| diff --git a/Source/modules/indexeddb/IDBCursor.cpp b/Source/modules/indexeddb/IDBCursor.cpp
|
| index ee01c33919af9c62a53dcc792d33666a884d6d9e..37e0dcfca46b266f73bdce067a81298bd9ec2391 100644
|
| --- a/Source/modules/indexeddb/IDBCursor.cpp
|
| +++ b/Source/modules/indexeddb/IDBCursor.cpp
|
| @@ -166,6 +166,10 @@ void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue&
|
| exceptionState.throwDOMException(InvalidAccessError, "The cursor's source is not an index.");
|
| return;
|
| }
|
| + if (m_direction != WebIDBCursorDirectionNext && m_direction != WebIDBCursorDirectionPrev) {
|
| + exceptionState.throwDOMException(InvalidAccessError, "The cursor's direction is not 'next' or 'prev'.");
|
| + return;
|
| + }
|
|
|
| IDBKey* key = ScriptValue::to<IDBKey*>(scriptState->isolate(), keyValue, exceptionState);
|
| if (exceptionState.hadException())
|
|
|