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

Unified Diff: Source/modules/indexeddb/IDBIndex.cpp

Issue 1158973007: IndexedDB: Rely on bindings for enum validation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minimize diff Created 5 years, 7 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: Source/modules/indexeddb/IDBIndex.cpp
diff --git a/Source/modules/indexeddb/IDBIndex.cpp b/Source/modules/indexeddb/IDBIndex.cpp
index d0f335006326795fa582f735c8eb7d73d5d0272e..f3d31e7656922316aa306938e55245a077964e86 100644
--- a/Source/modules/indexeddb/IDBIndex.cpp
+++ b/Source/modules/indexeddb/IDBIndex.cpp
@@ -86,10 +86,7 @@ IDBRequest* IDBIndex::openCursor(ScriptState* scriptState, const ScriptValue& ra
exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
return nullptr;
}
- WebIDBCursorDirection direction = IDBCursor::stringToDirection(directionString, exceptionState);
- if (exceptionState.hadException())
- return nullptr;
-
+ WebIDBCursorDirection direction = IDBCursor::stringToDirection(directionString);
IDBKeyRange* keyRange = IDBKeyRange::fromScriptValue(scriptState->executionContext(), range, exceptionState);
if (exceptionState.hadException())
return nullptr;
@@ -155,10 +152,7 @@ IDBRequest* IDBIndex::openKeyCursor(ScriptState* scriptState, const ScriptValue&
exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
return nullptr;
}
- WebIDBCursorDirection direction = IDBCursor::stringToDirection(directionString, exceptionState);
- if (exceptionState.hadException())
- return nullptr;
-
+ WebIDBCursorDirection direction = IDBCursor::stringToDirection(directionString);
IDBKeyRange* keyRange = IDBKeyRange::fromScriptValue(scriptState->executionContext(), range, exceptionState);
if (exceptionState.hadException())
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698