[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
Thu Feb 7 20:02:06 PST 2013


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





--- Comment #39 from Darin Adler <darin at apple.com>  2013-02-07 20:04:11 PST ---
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.

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.

-- 
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