Index: Source/modules/indexeddb/IDBFactory.cpp |
diff --git a/Source/modules/indexeddb/IDBFactory.cpp b/Source/modules/indexeddb/IDBFactory.cpp |
index db08ff96b216029ee808ceab8ed1be94a11e66f5..161ab02423ed8705fa0f1915cda1999e08078ab4 100644 |
--- a/Source/modules/indexeddb/IDBFactory.cpp |
+++ b/Source/modules/indexeddb/IDBFactory.cpp |
@@ -92,19 +92,15 @@ IDBRequest* IDBFactory::getDatabaseNames(ScriptState* scriptState, ExceptionStat |
return request; |
} |
-IDBOpenDBRequest* IDBFactory::open(ScriptState* scriptState, const String& name, unsigned long long version, ExceptionState& exceptionState) |
+IDBOpenDBRequest* IDBFactory::open(ScriptState* scriptState, const String& name, Optional<unsigned long long> optionalVersion, ExceptionState& exceptionState) |
{ |
IDB_TRACE("IDBFactory::open"); |
+ Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBOpenCall, IDBMethodsMax); |
+ int64_t version = optionalVersion.isMissing() ? IDBDatabaseMetadata::NoIntVersion : optionalVersion.get(); |
if (!version) { |
exceptionState.throwTypeError("The version provided must not be 0."); |
return 0; |
} |
- return openInternal(scriptState, name, version, exceptionState); |
-} |
- |
-IDBOpenDBRequest* IDBFactory::openInternal(ScriptState* scriptState, const String& name, int64_t version, ExceptionState& exceptionState) |
-{ |
- Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEndAPICalls", IDBOpenCall, IDBMethodsMax); |
ASSERT(version >= 1 || version == IDBDatabaseMetadata::NoIntVersion); |
if (name.isNull()) { |
exceptionState.throwTypeError("The name provided must not be empty."); |
@@ -130,12 +126,6 @@ IDBOpenDBRequest* IDBFactory::openInternal(ScriptState* scriptState, const Strin |
return request; |
} |
-IDBOpenDBRequest* IDBFactory::open(ScriptState* scriptState, const String& name, ExceptionState& exceptionState) |
-{ |
- IDB_TRACE("IDBFactory::open"); |
- return openInternal(scriptState, name, IDBDatabaseMetadata::NoIntVersion, exceptionState); |
-} |
- |
IDBOpenDBRequest* IDBFactory::deleteDatabase(ScriptState* scriptState, const String& name, ExceptionState& exceptionState) |
{ |
IDB_TRACE("IDBFactory::deleteDatabase"); |