[Webkit-unassigned] [Bug 82888] Consider replacing return type of Clipboard::types() from ListHashSet<String> to Vector<String>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 8 15:54:33 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=82888





--- Comment #42 from Vineet Chaudhary (vineetc) <rgf748 at motorola.com>  2013-02-08 15:56:40 PST ---
(In reply to comment #39)
Thanks Darin for suggestions:

> The problem comes because Ben Poulain added code to the WTF String class that assumes that char arrays are string literals with lengths that can be determined at compile time, whereas char pointers require a strlen at runtime. The definition of mimeTypeTextHTML is a char array with an undefined length and one that is not a string literal, so it violates this assumption.
> 
> A simple fix would be to change this:
> 
> extern const char mimeTypeTextHTML[];
> 
> in ClipboardMimeTypes.h to this:
> 
> extern const char* const mimeTypeTextHTML;
> 
> And update the .cpp file to match.

I not sure if this needs to change files in chromium port too.

> Another fix would be to put the mimeTypeTextHTML value into a local variable of type const char* in the type functions its used in, inside DragDataChromium.cpp.

I have attached patch with this approach, It builds for cr-linux.
Asking for help if someone has access to cr-win port needs to verify patch.
I understand commit|fail|rollout is bad path  again :(.

BTW can I build/test local patches on bots? I tried with "webkit-patch cr-win-ews" but it doesn't worked.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list