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

Side by Side Diff: Source/modules/indexeddb/IDBCursor.cpp

Issue 719933004: Use "unsigned" rather than "unsigned long" for C++ code interacting with WebIDL's "unsigned long". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.h ('k') | no next file » | 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 if (m_transaction->isReadOnly()) { 116 if (m_transaction->isReadOnly()) {
117 exceptionState.throwDOMException(ReadOnlyError, "The record may not be u pdated inside a read-only transaction."); 117 exceptionState.throwDOMException(ReadOnlyError, "The record may not be u pdated inside a read-only transaction.");
118 return 0; 118 return 0;
119 } 119 }
120 120
121 IDBObjectStore* objectStore = effectiveObjectStore(); 121 IDBObjectStore* objectStore = effectiveObjectStore();
122 return objectStore->put(scriptState, WebIDBPutModeCursorUpdate, IDBAny::crea te(this), value, m_primaryKey, exceptionState); 122 return objectStore->put(scriptState, WebIDBPutModeCursorUpdate, IDBAny::crea te(this), value, m_primaryKey, exceptionState);
123 } 123 }
124 124
125 void IDBCursor::advance(unsigned long count, ExceptionState& exceptionState) 125 void IDBCursor::advance(unsigned count, ExceptionState& exceptionState)
126 { 126 {
127 IDB_TRACE("IDBCursor::advance"); 127 IDB_TRACE("IDBCursor::advance");
128 if (!count) { 128 if (!count) {
129 exceptionState.throwTypeError("A count argument with value 0 (zero) was supplied, must be greater than 0."); 129 exceptionState.throwTypeError("A count argument with value 0 (zero) was supplied, must be greater than 0.");
130 return; 130 return;
131 } 131 }
132 if (!m_gotValue) { 132 if (!m_gotValue) {
133 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValue ErrorMessage); 133 exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValue ErrorMessage);
134 return; 134 return;
135 } 135 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 case WebIDBCursorDirectionPrevNoDuplicate: 393 case WebIDBCursorDirectionPrevNoDuplicate:
394 return IndexedDBNames::prevunique; 394 return IndexedDBNames::prevunique;
395 395
396 default: 396 default:
397 ASSERT_NOT_REACHED(); 397 ASSERT_NOT_REACHED();
398 return IndexedDBNames::next; 398 return IndexedDBNames::next;
399 } 399 }
400 } 400 }
401 401
402 } // namespace blink 402 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698