Bug 106659 - [Qt][WK2] plugin tests assert in debug
Summary: [Qt][WK2] plugin tests assert in debug
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Balazs Kelemen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-11 06:18 PST by Balazs Kelemen
Modified: 2013-01-15 03:09 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.84 KB, patch)
2013-01-11 06:26 PST, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2013-01-11 06:18:48 PST
In PluginProcessProxy::scanPlugin -> ASSERT(lines.size() == 3)
Comment 1 Balazs Kelemen 2013-01-11 06:26:05 PST
Created attachment 182331 [details]
Patch
Comment 2 Benjamin Poulain 2013-01-11 19:47:17 PST
Comment on attachment 182331 [details]
Patch

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

> Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:175
> +    String result = newLength == oldLength + 1 ? stringBuffer : String(stringBuffer.characters16(), newLength);

I think a if() else would read better. I don't really mind either if you keep this.

> Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:176
> +    ASSERT(result.endsWith(UChar('\n')));

You should not have to cast to UChar here. If you get a warning without the cast, let's fix WTFString instead.

> Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:211
> -        ASSERT(lines.size() == 3);
> +        ASSERT(lines.size() == 4 && lines.last().isEmpty());

Looks sane. I trust you on the output.
Comment 3 Balazs Kelemen 2013-01-14 03:10:05 PST
Thanks for the quick review!

> 
> > Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:176
> > +    ASSERT(result.endsWith(UChar('\n')));
> 
> You should not have to cast to UChar here. If you get a warning without the cast, let's fix WTFString instead.

Hm, I'm not sure about how to do this. Using the UChar version has the implicit assumption that it is a 16 bit string. So, should we allow an LChar version only 8 for bit strings, or both? I would rather postpone this to a follow-up.

Landed in http://trac.webkit.org/changeset/139600