<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Update WOFF2 decoder"
href="https://bugs.webkit.org/show_bug.cgi?id=162608#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Update WOFF2 decoder"
href="https://bugs.webkit.org/show_bug.cgi?id=162608">bug 162608</a>
from <span class="vcard"><a class="email" href="mailto:fred.wang@free.fr" title="Frédéric Wang (:fredw) <fred.wang@free.fr>"> <span class="fn">Frédéric Wang (:fredw)</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=289945&action=diff" name="attach_289945" title="Patch, v2">attachment 289945</a> <a href="attachment.cgi?id=289945&action=edit" title="Patch, v2">[details]</a></span>
Patch, v2
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=289945&action=review">https://bugs.webkit.org/attachment.cgi?id=289945&action=review</a>
<span class="quote">> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:103
> + return Write(data, m_size, n);</span >
I think this should be removed.
<span class="quote">> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:104
> + if (!m_vector.tryReserveCapacity(m_size + n))</span >
Is it needed? It seems that WTF::Vector::append already calls expandCapacity.
<span class="quote">> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:113
> + if (!m_vector.tryReserveCapacity(m_size + n))</span >
Same here.
<span class="quote">> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:116
> + m_vector.insert(offset, static_cast<const char*>(data), n);</span >
I wonder if it's possible to copy the data in one step.
<span class="quote">> Source/WebCore/platform/graphics/WOFFFileFormat.cpp:128
> + size_t m_size;</span >
Do you really need this member? It seems that you can just use m_vector::size()</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>