Summary: | Migrate ExceptionCode ASSERTs in IDB to ASSERT_NO_EXCEPTION. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mike West <mkwst> | ||||||||
Component: | WebCore Misc. | Assignee: | Mike West <mkwst> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | alecflett, dgrogan, jochen, jsbell, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | 109044 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Mike West
2013-02-08 00:21:37 PST
Created attachment 187280 [details]
Patch
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? Created attachment 187287 [details]
Patch
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? (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. Created attachment 187289 [details]
Patch
(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. Comment on attachment 187289 [details] Patch Clearing flags on attachment: 187289 Committed r142262: <http://trac.webkit.org/changeset/142262> All reviewed patches have been landed. Closing bug. |