[Webkit-unassigned] [Bug 141950] Use std::unique_ptr instead of OwnPtr in ThreadGlobalData

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 24 09:09:54 PST 2015


--- Comment #4 from Anders Carlsson <andersca at apple.com> ---
(In reply to comment #3)
> Comment on attachment 247198 [details]
> Patch
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=247198&action=review
> > Source/WebCore/dom/EventNames.h:311
> > +    EventNames();
> Anders, what should we do about this? We went out of our way to make this
> constructor private so we would not accidentally call it rather than the
> global function. Making it public seems unfortunate. Is there some other
> technique to make make_unique work, or no?

I suppose we could make std::make_unique be a friend of the class? Something like:

template<typename T, typename... Args>
friend std::unique_ptr<T> make_unique(Args&&...);

> > Source/WebCore/loader/cache/CachedResourceRequestInitiators.h:35
> > +    CachedResourceRequestInitiators();
> This one seems like less of a problem. Doesn’t seem likely someone would
> instantiate it by accident.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150224/50571ae8/attachment-0002.html>

More information about the webkit-unassigned mailing list