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

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

Issue 1003713002: [bindings] Rename IDBBindingUtilities.cpp to V8BindingForModules.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/modules/indexeddb/IDBKeyRange.cpp
diff --git a/Source/modules/indexeddb/IDBKeyRange.cpp b/Source/modules/indexeddb/IDBKeyRange.cpp
index d86703d649da59ca7568845713bfed1b80fc1dc3..a78cf1936d740e9431abccd1244c8a52be7d676f 100644
--- a/Source/modules/indexeddb/IDBKeyRange.cpp
+++ b/Source/modules/indexeddb/IDBKeyRange.cpp
@@ -27,7 +27,8 @@
#include "modules/indexeddb/IDBKeyRange.h"
#include "bindings/core/v8/ExceptionState.h"
-#include "bindings/modules/v8/IDBBindingUtilities.h"
+#include "bindings/modules/v8/ToV8ForModules.h"
+#include "bindings/modules/v8/V8BindingForModules.h"
#include "core/dom/ExceptionCode.h"
#include "modules/indexeddb/IDBDatabase.h"
@@ -38,11 +39,11 @@ IDBKeyRange* IDBKeyRange::fromScriptValue(ExecutionContext* context, const Scrip
if (value.isUndefined() || value.isNull())
return 0;
- IDBKeyRange* range = scriptValueToIDBKeyRange(toIsolate(context), value);
+ IDBKeyRange* range = script_value_cast<IDBKeyRange*>(value, toIsolate(context), exceptionState);
if (range)
return range;
- IDBKey* key = scriptValueToIDBKey(toIsolate(context), value);
+ IDBKey* key = script_value_cast<IDBKey*>(value, toIsolate(context), exceptionState);
if (!key || !key->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -67,12 +68,12 @@ DEFINE_TRACE(IDBKeyRange)
ScriptValue IDBKeyRange::lowerValue(ScriptState* scriptState) const
{
- return idbKeyToScriptValue(scriptState, m_lower);
+ return ScriptValue::from(scriptState, m_lower);
}
ScriptValue IDBKeyRange::upperValue(ScriptState* scriptState) const
{
- return idbKeyToScriptValue(scriptState, m_upper);
+ return ScriptValue::from(scriptState, m_upper);
}
IDBKeyRange* IDBKeyRange::only(IDBKey* key, ExceptionState& exceptionState)
@@ -87,7 +88,7 @@ IDBKeyRange* IDBKeyRange::only(IDBKey* key, ExceptionState& exceptionState)
IDBKeyRange* IDBKeyRange::only(ExecutionContext* context, const ScriptValue& keyValue, ExceptionState& exceptionState)
{
- IDBKey* key = scriptValueToIDBKey(toIsolate(context), keyValue);
+ IDBKey* key = script_value_cast<IDBKey*>(keyValue, toIsolate(context), exceptionState);
if (!key || !key->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -98,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 = scriptValueToIDBKey(toIsolate(context), boundValue);
+ IDBKey* bound = script_value_cast<IDBKey*>(boundValue, toIsolate(context), exceptionState);
if (!bound || !bound->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -109,7 +110,7 @@ IDBKeyRange* IDBKeyRange::lowerBound(ExecutionContext* context, const ScriptValu
IDBKeyRange* IDBKeyRange::upperBound(ExecutionContext* context, const ScriptValue& boundValue, bool open, ExceptionState& exceptionState)
{
- IDBKey* bound = scriptValueToIDBKey(toIsolate(context), boundValue);
+ IDBKey* bound = script_value_cast<IDBKey*>(boundValue, toIsolate(context), exceptionState);
if (!bound || !bound->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return 0;
@@ -120,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 = scriptValueToIDBKey(toIsolate(context), lowerValue);
- IDBKey* upper = scriptValueToIDBKey(toIsolate(context), upperValue);
+ IDBKey* lower = script_value_cast<IDBKey*>(lowerValue, toIsolate(context), exceptionState);
+ IDBKey* upper = script_value_cast<IDBKey*>(upperValue, toIsolate(context), exceptionState);
if (!lower || !lower->isValid() || !upper || !upper->isValid()) {
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);

Powered by Google App Engine
This is Rietveld 408576698