Changeset 142356 in webkit


Ignore:
Timestamp:
Feb 9, 2013 7:14:20 AM (11 years ago)
Author:
mkwst@chromium.org
Message:

Drop ExceptionCode from IDB's directionToString and modeToString.
https://bugs.webkit.org/show_bug.cgi?id=109143

Reviewed by Jochen Eisinger.

No caller of either IDBCursor::directionToString or
IDBTransaction::modeToString makes use of the ExceptionCode these
methods require. This patch removes the 'ExceptionCode&' parameter from
both methods and their callsites.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::direction):
(WebCore::IDBCursor::directionToString):

Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
exception previously generated with ASSERT_NOT_REACHED.

  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::mode):
(WebCore::IDBTransaction::modeToString):

Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
exception previously generated with ASSERT_NOT_REACHED.

  • Modules/indexeddb/IDBTransaction.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142355 r142356  
     12013-02-09  Mike West  <mkwst@chromium.org>
     2
     3        Drop ExceptionCode from IDB's directionToString and modeToString.
     4        https://bugs.webkit.org/show_bug.cgi?id=109143
     5
     6        Reviewed by Jochen Eisinger.
     7
     8        No caller of either IDBCursor::directionToString or
     9        IDBTransaction::modeToString makes use of the ExceptionCode these
     10        methods require. This patch removes the 'ExceptionCode&' parameter from
     11        both methods and their callsites.
     12
     13        * Modules/indexeddb/IDBCursor.cpp:
     14        (WebCore::IDBCursor::direction):
     15        (WebCore::IDBCursor::directionToString):
     16            Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
     17            exception previously generated with ASSERT_NOT_REACHED.
     18        * Modules/indexeddb/IDBCursor.h:
     19        * Modules/indexeddb/IDBTransaction.cpp:
     20        (WebCore::IDBTransaction::mode):
     21        (WebCore::IDBTransaction::modeToString):
     22            Drop the 'ExceptionCode&' parameter, and replace the 'TypeError'
     23            exception previously generated with ASSERT_NOT_REACHED.
     24        * Modules/indexeddb/IDBTransaction.h:
     25
    1262013-02-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
    227
  • trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp

    r142262 r142356  
    9696{
    9797    IDB_TRACE("IDBCursor::direction");
    98     return directionToString(m_direction, ASSERT_NO_EXCEPTION);
     98    return directionToString(m_direction);
    9999}
    100100
     
    314314}
    315315
    316 const AtomicString& IDBCursor::directionToString(unsigned short direction, ExceptionCode& ec)
     316const AtomicString& IDBCursor::directionToString(unsigned short direction)
    317317{
    318318    switch (direction) {
     
    330330
    331331    default:
    332         ec = TypeError;
     332        ASSERT_NOT_REACHED();
    333333        return IDBCursor::directionNext();
    334334    }
  • trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h

    r140457 r142356  
    6363
    6464    static IDBCursor::Direction stringToDirection(const String& modeString, ScriptExecutionContext*, ExceptionCode&);
    65     static const AtomicString& directionToString(unsigned short mode, ExceptionCode&);
     65    static const AtomicString& directionToString(unsigned short mode);
    6666
    6767    static PassRefPtr<IDBCursor> create(PassRefPtr<IDBCursorBackendInterface>, Direction, IDBRequest*, IDBAny* source, IDBTransaction*);
  • trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp

    r142271 r142356  
    123123const String& IDBTransaction::mode() const
    124124{
    125     return modeToString(m_mode, ASSERT_NO_EXCEPTION);
     125    return modeToString(m_mode);
    126126}
    127127
     
    348348}
    349349
    350 const AtomicString& IDBTransaction::modeToString(IDBTransaction::Mode mode, ExceptionCode& ec)
     350const AtomicString& IDBTransaction::modeToString(IDBTransaction::Mode mode)
    351351{
    352352    switch (mode) {
     
    364364
    365365    default:
    366         ec = TypeError;
     366        ASSERT_NOT_REACHED();
    367367        return IDBTransaction::modeReadOnly();
    368368    }
  • trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h

    r141523 r142356  
    6969
    7070    static Mode stringToMode(const String&, ScriptExecutionContext*, ExceptionCode&);
    71     static const AtomicString& modeToString(Mode, ExceptionCode&);
     71    static const AtomicString& modeToString(Mode);
    7272
    7373    IDBDatabaseBackendInterface* backendDB() const;
Note: See TracChangeset for help on using the changeset viewer.