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

Side by Side Diff: Source/modules/indexeddb/IDBCursor.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 unified diff | Download patch
« no previous file with comments | « Source/modules/gamepad/WebKitGamepadList.idl ('k') | Source/modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 m_request->setPendingCursor(this); 147 m_request->setPendingCursor(this);
148 m_gotValue = false; 148 m_gotValue = false;
149 m_backend->advance(count, WebIDBCallbacksImpl::create(m_request).leakPtr()); 149 m_backend->advance(count, WebIDBCallbacksImpl::create(m_request).leakPtr());
150 } 150 }
151 151
152 void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& ke yValue, ExceptionState& exceptionState) 152 void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& ke yValue, ExceptionState& exceptionState)
153 { 153 {
154 IDB_TRACE("IDBCursor::continue"); 154 IDB_TRACE("IDBCursor::continue");
155 IDBKey* key = keyValue.isUndefined() || keyValue.isNull() ? nullptr : script ValueToIDBKey(scriptState->isolate(), keyValue); 155 IDBKey* key = keyValue.isEmpty() || keyValue.isUndefined() || keyValue.isNul l() ? nullptr : scriptValueToIDBKey(scriptState->isolate(), keyValue);
156 if (key && !key->isValid()) { 156 if (key && !key->isValid()) {
157 exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErro rMessage); 157 exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErro rMessage);
158 return; 158 return;
159 } 159 }
160 continueFunction(key, 0, exceptionState); 160 continueFunction(key, 0, exceptionState);
161 } 161 }
162 162
163 void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue& keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState) 163 void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue& keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState)
164 { 164 {
165 IDB_TRACE("IDBCursor::continuePrimaryKey"); 165 IDB_TRACE("IDBCursor::continuePrimaryKey");
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 case WebIDBCursorDirectionPrevNoDuplicate: 387 case WebIDBCursorDirectionPrevNoDuplicate:
388 return IndexedDBNames::prevunique; 388 return IndexedDBNames::prevunique;
389 389
390 default: 390 default:
391 ASSERT_NOT_REACHED(); 391 ASSERT_NOT_REACHED();
392 return IndexedDBNames::next; 392 return IndexedDBNames::next;
393 } 393 }
394 } 394 }
395 395
396 } // namespace blink 396 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/gamepad/WebKitGamepadList.idl ('k') | Source/modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698