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

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

Issue 1009503003: [bindings] Introduce ScriptValue.to<T> to convert to native values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 9 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
« no previous file with comments | « Source/bindings/modules/v8/V8BindingForModules.h ('k') | Source/modules/indexeddb/IDBFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBCursor.cpp
diff --git a/Source/modules/indexeddb/IDBCursor.cpp b/Source/modules/indexeddb/IDBCursor.cpp
index dfc7659b01d2dd1e29ef33f8e2ac018d9a9dbd20..f333de4e522dd364d3bcab680a2c3f01b40699ac 100644
--- a/Source/modules/indexeddb/IDBCursor.cpp
+++ b/Source/modules/indexeddb/IDBCursor.cpp
@@ -149,7 +149,7 @@ void IDBCursor::advance(unsigned count, ExceptionState& exceptionState)
void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& keyValue, ExceptionState& exceptionState)
{
IDB_TRACE("IDBCursor::continue");
- IDBKey* key = keyValue.isUndefined() || keyValue.isNull() ? nullptr : scriptValueToIDBKey(scriptState->isolate(), keyValue);
+ IDBKey* key = keyValue.isUndefined() || keyValue.isNull() ? nullptr : keyValue.to<IDBKey*>(exceptionState);
if (key && !key->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return;
@@ -160,8 +160,8 @@ void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& ke
void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue& keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState)
{
IDB_TRACE("IDBCursor::continuePrimaryKey");
- IDBKey* key = scriptValueToIDBKey(scriptState->isolate(), keyValue);
- IDBKey* primaryKey = scriptValueToIDBKey(scriptState->isolate(), primaryKeyValue);
+ IDBKey* key = keyValue.to<IDBKey*>(exceptionState);
+ IDBKey* primaryKey = primaryKeyValue.to<IDBKey*>(exceptionState);
if (!key->isValid() || !primaryKey->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return;
« no previous file with comments | « Source/bindings/modules/v8/V8BindingForModules.h ('k') | Source/modules/indexeddb/IDBFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698