[Webkit-unassigned] [Bug 147035] [GTK] Cleanup PasteboardHelper

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 17 01:51:14 PDT 2015


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

--- Comment #3 from Zan Dobersek <zan at falconsigh.net> ---
Comment on attachment 256960
  --> https://bugs.webkit.org/attachment.cgi?id=256960
Patch

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

> Source/WebCore/ChangeLog:11
> +        PasteboardHelper::singleton() and make it non-copiable, fast

Nit: non-copyable.

> Source/WebCore/platform/gtk/PasteboardHelper.cpp:70
> +    gMarkupPrefix = String::fromUTF8("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">");

Not terribly important since it's only called once, but this string seems ASCII-only, so you could initialize gMarkipPrefix from an ASCIILiteral.

Also, can this be initialized where it's declared?

> Source/WebCore/platform/gtk/PasteboardHelper.h:38
> +    WTF_MAKE_NONCOPYABLE(PasteboardHelper); WTF_MAKE_FAST_ALLOCATED;

No need for WTF_MAKE_FAST_ALLOCATED. There's only one object alive during the program's lifetime, and that one is constructed in memory that's reserved by the static NeverDestroyed<PasteboardHelper> object.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150717/9911498f/attachment.html>


More information about the webkit-unassigned mailing list