Dave is not confident that it will work right if you don't wait for the delete to complete, so you'd better keep this onsuccess handler. But you also need to add an onerror handler that calls cursor.continue.  Note that you can assign the same function to both onsuccess and onerror.