[Webkit-unassigned] [Bug 134488] Async loading of image resources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 8 19:29:14 PDT 2015


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

--- Comment #28 from Darin Adler <darin at apple.com> ---
Comment on attachment 248223
  --> https://bugs.webkit.org/attachment.cgi?id=248223
Patch

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

> Source/WebCore/loader/ImageLoader.h:49
> +    WTF_MAKE_NONCOPYABLE(IncrementLoadEventDelayCount);

I’m not sure this needs to be here.

> Source/WebCore/loader/ImageLoader.h:57
> +    IncrementLoadEventDelayCount() { };
> +    IncrementLoadEventDelayCount(IncrementLoadEventDelayCount&& other)
> +        : m_document(WTF::move(other.m_document))
> +    {
> +        other.m_document.clear();
> +    }

These function bodies don’t need to be in the header. Also, there’s no need to declare the empty constructor at all.

The code here to move a WeakPtr should be put into the WeakPtr template. If that was done correctly, then we would not need to explicitly define a move constructor at all.

> Source/WebCore/loader/ImageLoader.h:67
> +    WeakPtr<Document> m_document;

I am not sure we need a WeakPtr here. I believe that callers already handle the lifetime for the document properly and destroy the image loader before the document is destroyed; this WeakPtr would add unnecessary overhead.

-- 
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/20150309/c1491e48/attachment-0002.html>


More information about the webkit-unassigned mailing list