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

Unified Diff: Source/WebCore/Modules/indexeddb/IDBCursor.cpp

Issue 11184033: Merge 131658 - IndexedDB: Enforce unsigned long/unsigned long long ranges (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 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/WebCore/Modules/indexeddb/IDBCursor.h ('k') | Source/WebCore/Modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/Modules/indexeddb/IDBCursor.cpp
===================================================================
--- Source/WebCore/Modules/indexeddb/IDBCursor.cpp (revision 131667)
+++ Source/WebCore/Modules/indexeddb/IDBCursor.cpp (working copy)
@@ -155,7 +155,7 @@
return objectStore->put(IDBObjectStoreBackendInterface::CursorUpdate, IDBAny::create(this), context, value, m_currentPrimaryKey, ec);
}
-void IDBCursor::advance(unsigned long count, ExceptionCode& ec)
+void IDBCursor::advance(long count, ExceptionCode& ec)
{
IDB_TRACE("IDBCursor::advance");
if (!m_gotValue) {
@@ -168,7 +168,9 @@
return;
}
- if (!count) {
+ // FIXME: This should only need to check for 0 once webkit.org/b/96798 lands.
+ const int64_t maxECMAScriptInteger = 0x20000000000000LL - 1;
+ if (count < 1 || count > maxECMAScriptInteger) {
ec = NATIVE_TYPE_ERR;
return;
}
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBCursor.h ('k') | Source/WebCore/Modules/indexeddb/IDBCursor.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698