Bug 139959

Summary: Handle more types in the UserData encode/decode functions
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Description Anders Carlsson 2014-12-26 13:59:04 PST
Handle more types in the UserData encode/decode functions
Comment 1 Anders Carlsson 2014-12-26 14:01:06 PST
Created attachment 243764 [details]
Patch
Comment 2 mitz 2014-12-26 14:10:11 PST
Comment on attachment 243764 [details]
Patch

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

> Source/WebKit2/Shared/UserData.cpp:414
> +        return true;

Why not break; like elsewhere?

> Source/WebKit2/Shared/UserData.cpp:476
> +

No need for this empty line.

> Source/WebKit2/Shared/UserData.cpp:514
> +        if (children && children->type() != API::Object::Type::Array)
> +            return false;

Why do you type-check children here but not elementClassNames and not any of the API objects decoded in RenderLayer?
Comment 3 Anders Carlsson 2014-12-26 14:16:13 PST
(In reply to comment #2)

> > Source/WebKit2/Shared/UserData.cpp:514
> > +        if (children && children->type() != API::Object::Type::Array)
> > +            return false;
> 
> Why do you type-check children here but not elementClassNames and not any of
> the API objects decoded in RenderLayer?

This code is just copied from the legacy decoder. I guess you'll have to ask the author of that patch...
Comment 4 Anders Carlsson 2014-12-26 14:16:33 PST
Committed r177750: <http://trac.webkit.org/changeset/177750>