Bug 106442

Summary: IndexedDB: Remove ASSERTs that can't assert but result in compiler warnings
Product: WebKit Reporter: Jussi Kukkonen (jku) <jussi.kukkonen>
Component: WebCore Misc.Assignee: Jussi Kukkonen (jku) <jussi.kukkonen>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, cdumez, haraken, jsbell, jussi.kukkonen, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jussi Kukkonen (jku) 2013-01-09 04:32:32 PST
IDBLevelDBCoding::m_metaDataType has been changed to unsigned so ASSERT(m_metaDataType >= 0) is not useful: it does create build problems at least with EFL.

Attaching patch.
Comment 1 Jussi Kukkonen (jku) 2013-01-09 04:40:39 PST
Created attachment 181896 [details]
Patch
Comment 2 Chris Dumez 2013-01-09 04:45:09 PST
How about this?

> ObjectStoreMetaDataKey::ObjectStoreMetaDataKey()
>     : m_objectStoreId(-1)
>     , m_metaDataType(-1)
> {
> }
Comment 3 Kentaro Hara 2013-01-09 04:57:28 PST
Comment on attachment 181896 [details]
Patch

OK
Comment 4 Jussi Kukkonen (jku) 2013-01-09 05:19:03 PST
(In reply to comment #2)
> How about this?
> 
> > ObjectStoreMetaDataKey::ObjectStoreMetaDataKey()
> >     : m_objectStoreId(-1)
> >     , m_metaDataType(-1)
> > {
> > }

Good that you mentioned, I was planning to but forgot.

It's ugly but should work, assuming that presents a metadatatype that does not exist: see "enum MetaDataType" in the header for the 'good' values of metadatatype. We could add a unsetObjectStoreMetaDataType but that shouldn't be part of this patch I guess.
Comment 5 Kentaro Hara 2013-01-09 06:59:06 PST
Comment on attachment 181896 [details]
Patch

Please fix the issue Christophe pointed out in a follow-up patch.
Comment 6 WebKit Review Bot 2013-01-09 07:39:36 PST
Comment on attachment 181896 [details]
Patch

Clearing flags on attachment: 181896

Committed r139193: <http://trac.webkit.org/changeset/139193>
Comment 7 WebKit Review Bot 2013-01-09 07:39:40 PST
All reviewed patches have been landed.  Closing bug.