[Webkit-unassigned] [Bug 146832] [Curl] Crash in CurlDownload::didReceiveHeader when downloading file.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jul 26 21:22:11 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=146832
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #257466|review? |review+
Flags| |
--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 257466
--> https://bugs.webkit.org/attachment.cgi?id=257466
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=257466&action=review
> Source/WebCore/platform/network/curl/CurlDownload.cpp:309
> + ref(); // The download manager will call deref when the download has finished.
Might be better to say "CurlDownloadManager::downloadThread" will call deref when the download has finished.
> Source/WebCore/platform/network/curl/CurlDownload.cpp:407
> + ref();
You can capture a RefPtr to do this without an explicit ref/deref; RefPtr<CurlDownload> protectedDownload(this) or capturedDownload and then capture that. Doing that has a slight clarity advantage of running the deref if the lambda is ever deleted without being called, not an issue in these cases. Sometimes people capture both the RefPtr and "this".
--
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/20150727/589344dd/attachment.html>
More information about the webkit-unassigned
mailing list