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

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

Issue 1021713003: [bindings] Let NativeValueTraits<T>::nativeValue be variadic function and merge various convers… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: IDB related changes alone. 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/modules/indexeddb/IDBFactory.cpp ('k') | Source/modules/indexeddb/IDBObjectStore.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBKeyRange.cpp
diff --git a/Source/modules/indexeddb/IDBKeyRange.cpp b/Source/modules/indexeddb/IDBKeyRange.cpp
index 1ad1cc6c88a5c061c44447e3474e7176c0b0d8cd..0c01b89ca4aede973c41f68f52d77646722c1fca 100644
--- a/Source/modules/indexeddb/IDBKeyRange.cpp
+++ b/Source/modules/indexeddb/IDBKeyRange.cpp
@@ -39,11 +39,11 @@ IDBKeyRange* IDBKeyRange::fromScriptValue(ExecutionContext* context, const Scrip
if (value.isUndefined() || value.isNull())
return 0;
- IDBKeyRange* range = value.to<IDBKeyRange*>(exceptionState);
+ IDBKeyRange* range = ScriptValue::to<IDBKeyRange*>(toIsolate(context), value, exceptionState);
if (range)
return range;
- IDBKey* key = value.to<IDBKey*>(exceptionState);
+ IDBKey* key = ScriptValue::to<IDBKey*>(toIsolate(context), value, exceptionState);
if (!key || !key->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -88,7 +88,7 @@ IDBKeyRange* IDBKeyRange::only(IDBKey* key, ExceptionState& exceptionState)
IDBKeyRange* IDBKeyRange::only(ExecutionContext* context, const ScriptValue& keyValue, ExceptionState& exceptionState)
{
- IDBKey* key = keyValue.to<IDBKey*>(exceptionState);
+ IDBKey* key = ScriptValue::to<IDBKey*>(toIsolate(context), keyValue, exceptionState);
if (!key || !key->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -99,7 +99,7 @@ IDBKeyRange* IDBKeyRange::only(ExecutionContext* context, const ScriptValue& key
IDBKeyRange* IDBKeyRange::lowerBound(ExecutionContext* context, const ScriptValue& boundValue, bool open, ExceptionState& exceptionState)
{
- IDBKey* bound = boundValue.to<IDBKey*>(exceptionState);
+ IDBKey* bound = ScriptValue::to<IDBKey*>(toIsolate(context), boundValue, exceptionState);
if (!bound || !bound->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -110,7 +110,7 @@ IDBKeyRange* IDBKeyRange::lowerBound(ExecutionContext* context, const ScriptValu
IDBKeyRange* IDBKeyRange::upperBound(ExecutionContext* context, const ScriptValue& boundValue, bool open, ExceptionState& exceptionState)
{
- IDBKey* bound = boundValue.to<IDBKey*>(exceptionState);
+ IDBKey* bound = ScriptValue::to<IDBKey*>(toIsolate(context), boundValue, exceptionState);
if (!bound || !bound->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -121,8 +121,8 @@ IDBKeyRange* IDBKeyRange::upperBound(ExecutionContext* context, const ScriptValu
IDBKeyRange* IDBKeyRange::bound(ExecutionContext* context, const ScriptValue& lowerValue, const ScriptValue& upperValue, bool lowerOpen, bool upperOpen, ExceptionState& exceptionState)
{
- IDBKey* lower = lowerValue.to<IDBKey*>(exceptionState);
- IDBKey* upper = upperValue.to<IDBKey*>(exceptionState);
+ IDBKey* lower = ScriptValue::to<IDBKey*>(toIsolate(context), lowerValue, exceptionState);
+ IDBKey* upper = ScriptValue::to<IDBKey*>(toIsolate(context), upperValue, exceptionState);
if (!lower || !lower->isValid() || !upper || !upper->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
« no previous file with comments | « Source/modules/indexeddb/IDBFactory.cpp ('k') | Source/modules/indexeddb/IDBObjectStore.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698