Bug 43120

Summary: [IndexedDB] WebDOMStringList default ctor does not initialize its m_private member variable so any attempt to append strings to a WebDOMStringList instance results in a crash.
Product: WebKit Reporter: Andrei Popescu <andreip>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: jorlow
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch jorlow: review+

Description Andrei Popescu 2010-07-28 08:19:59 PDT
[IndexedDB] WebDOMStringList default ctor does not initialize its m_private member variable so any attempt to append strings to a WebDOMStringList instance results in a crash.
Comment 1 Andrei Popescu 2010-07-28 08:24:27 PDT
Created attachment 62824 [details]
Patch
Comment 2 Jeremy Orlow 2010-07-28 08:46:52 PDT
Comment on attachment 62824 [details]
Patch

LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js:37
 +      shouldBe("storeNames.contains('storeName')", "true");
Maybe also check that there's only this one item?

WebKit/chromium/public/WebDOMStringList.h:49
 +      WebDOMStringList();
I'd lean towards making this private and have 2 factory methods instead: "createEmpty" and "createNull".  Though since no one needs the "null" behavior today, I'm OK with you leaving this as is.

me
Comment 3 Andrei Popescu 2010-07-28 09:18:48 PDT
(In reply to comment #2)
> (From update of attachment 62824 [details])
> LayoutTests/storage/indexeddb/script-tests/objectstore-basics.js:37
>  +      shouldBe("storeNames.contains('storeName')", "true");
> Maybe also check that there's only this one item?
> 

Checked.

> WebKit/chromium/public/WebDOMStringList.h:49
>  +      WebDOMStringList();
> I'd lean towards making this private and have 2 factory methods instead: "createEmpty" and "createNull".  Though since no one needs the "null" behavior today, I'm OK with you leaving this as is.
> 

Cool, thank you.
Comment 4 Andrei Popescu 2010-07-28 09:28:06 PDT
Committed r64209: <http://trac.webkit.org/changeset/64209>