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

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

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: Created 6 years, 4 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.h ('k') | Source/modules/indexeddb/IDBIndex.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
« no previous file with comments | « Source/modules/indexeddb/IDBFactory.h ('k') | Source/modules/indexeddb/IDBIndex.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698