RESOLVED FIXED 109266
Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
https://bugs.webkit.org/show_bug.cgi?id=109266
Summary Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION.
Mike West
Reported 2013-02-08 00:21:37 PST
I attempted to land some seemingly straightforward IDB changes as part of https://bugs.webkit.org/show_bug.cgi?id=109044; they caused crashes. I'll figure out why and fix those files in a more focused patch.
Attachments
Patch (4.85 KB, patch)
2013-02-08 03:39 PST, Mike West
no flags
Patch (4.67 KB, patch)
2013-02-08 04:10 PST, Mike West
no flags
Patch (5.21 KB, patch)
2013-02-08 04:23 PST, Mike West
no flags
Mike West
Comment 1 2013-02-08 03:39:07 PST
Mike West
Comment 2 2013-02-08 03:40:37 PST
ASSERT_NO_EXCEPTIONS ensures, among other things, that methods which care about the value of 'ec' initialize it to 0. IDBCursor::continueFunction didn't, but ASSERTED(!ec) anyway. It doesn't in the current patch. Moar review, Jochen?
Mike West
Comment 3 2013-02-08 04:10:20 PST
jochen
Comment 4 2013-02-08 04:14:08 PST
Comment on attachment 187287 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=187287&action=review ok > Source/WebCore/Modules/indexeddb/IDBCursor.cpp:220 > + ec = 0; why not initialize this first thing in the method?
Mike West
Comment 5 2013-02-08 04:18:16 PST
(In reply to comment #4) > (From update of attachment 187287 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=187287&action=review > > ok > > > Source/WebCore/Modules/indexeddb/IDBCursor.cpp:220 > > + ec = 0; > > why not initialize this first thing in the method? Premature optimization. I figured we only need to initialize it in the case where the above block of 'if' statements doesn't set the value and return.
Mike West
Comment 6 2013-02-08 04:23:42 PST
Mike West
Comment 7 2013-02-08 04:25:15 PST
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 187287 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=187287&action=review > > > > ok > > > > > Source/WebCore/Modules/indexeddb/IDBCursor.cpp:220 > > > + ec = 0; > > > > why not initialize this first thing in the method? > > Premature optimization. I figured we only need to initialize it in the case where the above block of 'if' statements doesn't set the value and return. I moved the value up to the top of the method, and noticed two other methods where the same thing was happening. I don't think it's worth a rereview, as the change is exactly what you've already reviewed, just in two additional methods.
WebKit Review Bot
Comment 8 2013-02-08 05:06:08 PST
Comment on attachment 187289 [details] Patch Clearing flags on attachment: 187289 Committed r142262: <http://trac.webkit.org/changeset/142262>
WebKit Review Bot
Comment 9 2013-02-08 05:06:13 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.