Bug 758497: Mimic [EnforceRange] for cursor.advance until we get new WebIDL bindings. r=sicking

This commit is contained in:
Kyle Huey 2012-06-29 09:48:34 -07:00
parent d6b1c5293d
commit b2c37d1e48
2 changed files with 4 additions and 4 deletions

View File

@ -745,11 +745,11 @@ IDBCursor::Delete(JSContext* aCx,
}
NS_IMETHODIMP
IDBCursor::Advance(PRInt32 aCount)
IDBCursor::Advance(PRInt64 aCount)
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
if (aCount < 1) {
if (aCount < 1 || aCount > PR_UINT32_MAX) {
return NS_ERROR_TYPE_ERR;
}

View File

@ -13,7 +13,7 @@ interface nsIIDBRequest;
* http://dev.w3.org/2006/webapi/WebSimpleDB/#idl-def-IDBCursor for more
* information.
*/
[scriptable, builtinclass, uuid(01136b3a-d84c-487c-b929-f5d012346c44)]
[scriptable, builtinclass, uuid(148579a3-6b28-4b2a-92c3-ff5719e8e03e)]
interface nsIIDBCursor : nsISupports
{
// "next", "nextunique", "prev" or "prevunique"
@ -41,5 +41,5 @@ interface nsIIDBCursor : nsISupports
nsIIDBRequest delete();
void
advance(in long count);
advance(in long long count);
};