Bug 109143 - Drop ExceptionCode from IDB's directionToString and modeToString.
Summary: Drop ExceptionCode from IDB's directionToString and modeToString.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mike West
URL:
Keywords:
Depends on:
Blocks: 108180
  Show dependency treegraph
 
Reported: 2013-02-07 00:10 PST by Mike West
Modified: 2013-02-09 07:16 PST (History)
5 users (show)

See Also:


Attachments
Patch (5.19 KB, patch)
2013-02-07 00:57 PST, Mike West
no flags Details | Formatted Diff | Diff
Patch (5.43 KB, patch)
2013-02-08 05:21 PST, Mike West
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike West 2013-02-07 00:10:28 PST
jsbell notes:

View in context: https://bugs.webkit.org/attachment.cgi?id=186862&action=review

>> Source/WebCore/Modules/indexeddb/IDBCursor.cpp:99
>>      return direction;
> 
> No need for the local variable any more here.

And FYI the directionToString method is only ever called from here now; it was used when we supported both legacy numeric enum and new string values when called from script. Now that the numeric enum values are not supported from script we can drop the ExceptionCode argument from this method. But that can be done in a separate patch.

>> Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:125
>>      return mode;
> 
> No need for the local variable any more here.

And FYI, same as above. We can drop the ExceptionCode param from modeToStrng now.
Comment 1 Mike West 2013-02-07 00:57:06 PST
Created attachment 187010 [details]
Patch
Comment 2 Mike West 2013-02-07 01:14:29 PST
Jochen, perhaps you can take a look at this patch? Joshua says it's the right thing to do, so I hope the details are trivially reviewable. :)

It doesn't (yet) apply; I'll upload it again for the bots once https://bugs.webkit.org/show_bug.cgi?id=109044 lands.
Comment 3 Joshua Bell 2013-02-07 08:43:16 PST
Comment on attachment 187010 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=187010&action=review

> Source/WebCore/ChangeLog:9
> +        make use of the ExceptionCode they accept. This patch drops the unused

Nitpicking the description: the methods *did* use it, but all callsites ignored the result other than asserting because these methods are now only used with pre-validated data.

> Source/WebCore/Modules/indexeddb/IDBCursor.cpp:-329
> -        ec = TypeError;

Please add ASSERT_NOT_REACHED() here.

> Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:-365
> -        ec = TypeError;

Please add ASSERT_NOT_REACHED() here.
Comment 4 Joshua Bell 2013-02-07 08:44:31 PST
(In reply to comment #2)
> Jochen, perhaps you can take a look at this patch? Joshua says it's the right thing to do, so I hope the details are trivially reviewable. :)

I'm Joshua and I approve this patch (with those ASSERT_NOT_REACHED additions). Thanks, Jochen, and thanks Mike for putting it together!
Comment 5 Mike West 2013-02-08 05:21:24 PST
Created attachment 187296 [details]
Patch
Comment 6 Mike West 2013-02-08 05:23:32 PST
This should address Joshua's comments.

Jochen, if I haven't exhausted your patience yet today, would you mind taking a look at this patch as well?
Comment 7 jochen 2013-02-08 05:50:21 PST
Comment on attachment 187296 [details]
Patch

ok
Comment 8 WebKit Review Bot 2013-02-09 07:15:57 PST
Comment on attachment 187296 [details]
Patch

Clearing flags on attachment: 187296

Committed r142356: <http://trac.webkit.org/changeset/142356>
Comment 9 WebKit Review Bot 2013-02-09 07:16:01 PST
All reviewed patches have been landed.  Closing bug.