Bug 128763

Summary: IDB: Three tests crash the DatabaseProcess under ~KeyedDecoder
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebKit2Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, andersca, commit-queue, jsbell
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1 andersca: review+

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
http://trac.webkit.org/changeset/164062