Bug 113597

Summary: [Chromium] IndexedDB: Turn "should only be true in unit tests" comments into ASSERTs
Product: WebKit Reporter: Joshua Bell <jsbell>
Component: New BugsAssignee: Joshua Bell <jsbell>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, alecflett, dgrogan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Joshua Bell 2013-03-29 12:13:56 PDT
[Chromium] IndexedDB: Turn "should only be true in unit tests" comments into ASSERTs
Comment 1 Joshua Bell 2013-03-29 12:16:17 PDT
Created attachment 195778 [details]
Patch
Comment 2 Joshua Bell 2013-03-29 12:16:43 PDT
alecflett@, dgrogan@ - worth it or overkill?
Comment 3 David Grogan 2013-03-29 12:21:40 PDT
Comment on attachment 195778 [details]
Patch

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

Definitely worth it.

> Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp:1359
> +        ASSERT(m_factory || WebKit::Platform::current()->unitTestSupport());

Does it make sense to put
#else
 ASSERT(m_factory)

Do the other ports have unit tests?
Comment 4 Joshua Bell 2013-03-29 12:27:57 PDT
Comment on attachment 195778 [details]
Patch

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

>> Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp:1359
>> +        ASSERT(m_factory || WebKit::Platform::current()->unitTestSupport());
> 
> Does it make sense to put
> #else
>  ASSERT(m_factory)
> 
> Do the other ports have unit tests?

Not at this level of intrusion. Waffling on the #else - it's valid for now so probably worth adding.
Comment 5 Joshua Bell 2013-04-01 13:20:16 PDT
Created attachment 196014 [details]
Patch
Comment 6 Joshua Bell 2013-04-01 13:20:40 PDT
abarth@ - could you take a look at this?
Comment 7 WebKit Review Bot 2013-04-01 22:28:02 PDT
Comment on attachment 196014 [details]
Patch

Clearing flags on attachment: 196014

Committed r147381: <http://trac.webkit.org/changeset/147381>
Comment 8 WebKit Review Bot 2013-04-01 22:28:05 PDT
All reviewed patches have been landed.  Closing bug.