Bug 128763 - IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
Summary: IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
Depends on:
Reported: 2014-02-13 14:02 PST by Brady Eidson
Modified: 2014-02-13 15:34 PST (History)
4 users (show)

See Also:

Patch v1 (9.16 KB, patch)
2014-02-13 14:05 PST, Brady Eidson
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2014-02-13 14:02:17 PST
IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder

Each of these tests encoded an empty array.  The decoder handles decoding empty arrays, but the empty array is never encoded!

Two of these tests now pass, and the other switches over to a "non-trivial text failure"
Comment 1 Brady Eidson 2014-02-13 14:05:45 PST
Created attachment 224107 [details]
Patch v1
Comment 2 Anders Carlsson 2014-02-13 14:36:52 PST
Comment on attachment 224107 [details]
Patch v1

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

> Source/WebCore/platform/KeyedCoding.h:154
> +        // Even if this array is empty, the empty array still needs to be recorded.
> +        if (begin == end) {
> +            beginArray(key);
> +            endArray();
>              return;
> +        }

Just remove this instead, the code below will do the right thing.
Comment 3 Brady Eidson 2014-02-13 15:34:24 PST