Bug 43120 - [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.
Summary: [IndexedDB] WebDOMStringList default ctor does not initialize its m_private m...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-28 08:19 PDT by Andrei Popescu
Modified: 2010-07-28 09:28 PDT (History)
1 user (show)

See Also:


Attachments
Patch (4.03 KB, patch)
2010-07-28 08:24 PDT, Andrei Popescu
jorlow: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>