Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
authormkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 13:04:31 +0000 (13:04 +0000)
committermkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Feb 2013 13:04:31 +0000 (13:04 +0000)
commit9e97d348af9b82c74b5ae36b8dc2f8b421ecf513
treee5c89c8f40c162e2365711913f2e0ec3a8f61b2f
parente32f42a2b411813321fe1fae7cf6f8490cad8786
Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
https://bugs.webkit.org/show_bug.cgi?id=109266

Reviewed by Jochen Eisinger.

The pattern:

    ExceptionCode ec = 0;
    methodThatGeneratesException(ec);
    ASSERT(!ec);

is more clearly and succinctly written as:

    methodThatGeneratesException(ASSERT_NO_EXCEPTION);

This patch replaces the occurances of the former in IDB code that never
touch 'ec' again with the latter. No change in behavior should result
from this refactoring.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):
    These methods checked the value of the ExceptionCode without first
    initializing it to 0. Now the ExceptionCode is explicitly set to 0
    before doing potentially exception-generating work.
(WebCore::IDBCursor::direction):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::mode):
    Replace the above pattern with ASSERT_NO_EXCEPTION.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142262 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBCursor.cpp
Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp