Bug 139959 - Handle more types in the UserData encode/decode functions
Summary: Handle more types in the UserData encode/decode functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-26 13:59 PST by Anders Carlsson
Modified: 2014-12-26 14:17 PST (History)
1 user (show)

See Also:


Attachments
Patch (9.96 KB, patch)
2014-12-26 14:01 PST, Anders Carlsson
mitz: review+
Details | Formatted Diff | Diff

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