[Webkit-unassigned] [Bug 225299] Constructing a FormData from a form can lead to entries with lone surrogates
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 30 11:59:22 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=225299
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |darin at apple.com
--- Comment #12 from Darin Adler <darin at apple.com> ---
Comment on attachment 445426
--> https://bugs.webkit.org/attachment.cgi?id=445426
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=445426&action=review
> Source/WebCore/html/DOMFormData.cpp:87
> + return { usvName, File::create(blob.scriptExecutionContext(), blob, filename.isNull() ? "blob"_s : filename) };
I believe we can slightly reduce reference count churn by using WTFMove(usvName) here.
> Source/WebCore/html/DOMFormData.cpp:90
> + return { usvName, File::create(blob.scriptExecutionContext(), downcast<File>(blob), filename) };
Ditto.
> Source/WebCore/html/DOMFormData.cpp:92
> + return { usvName, RefPtr<File> { &downcast<File>(blob) } };
Ditto.
One other thought: I think we can just write RefPtr instead of RefPtr<File>.
--
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/20211130/9fcaf533/attachment-0001.htm>
More information about the webkit-unassigned
mailing list