Bug 837865 - Use DOMCursor instead of DeviceStorageCursor. r=bent

This commit is contained in:
Reuben Morais
2013-03-01 16:21:01 -08:00
parent d68b8ed4f2
commit b51a32c23b
8 changed files with 31 additions and 41 deletions

View File

@@ -39,7 +39,6 @@ DOMCursor::DOMCursor(nsIDOMWindow* aWindow, nsICursorContinueCallback* aCallback
, mCallback(aCallback)
, mFinished(false)
{
MOZ_ASSERT(aCallback);
}
void
@@ -51,7 +50,6 @@ DOMCursor::Reset()
if (mRooted) {
UnrootResultVal();
}
mResult = JSVAL_VOID;
mDone = false;
}
@@ -73,6 +71,8 @@ DOMCursor::GetDone(bool *aDone)
NS_IMETHODIMP
DOMCursor::Continue()
{
MOZ_ASSERT(mCallback, "If you're creating your own cursor class with no callback, you should override Continue()");
// We need to have a result here because we must be in a 'success' state.
if (mResult == JSVAL_VOID) {
return NS_ERROR_DOM_INVALID_STATE_ERR;