<html>
<head>
<base href="https://bugs.webkit.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:koivisto@iki.fi" title="Antti Koivisto <koivisto@iki.fi>"> <span class="fn">Antti Koivisto</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [link preload] Double downloads of preloaded content when it's in MemoryCache"
href="https://bugs.webkit.org/show_bug.cgi?id=170122">bug 170122</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #305793 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [link preload] Double downloads of preloaded content when it's in MemoryCache"
href="https://bugs.webkit.org/show_bug.cgi?id=170122#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [link preload] Double downloads of preloaded content when it's in MemoryCache"
href="https://bugs.webkit.org/show_bug.cgi?id=170122">bug 170122</a>
from <span class="vcard"><a class="email" href="mailto:koivisto@iki.fi" title="Antti Koivisto <koivisto@iki.fi>"> <span class="fn">Antti Koivisto</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=305793&action=diff" name="attach_305793" title="Patch">attachment 305793</a> <a href="attachment.cgi?id=305793&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=305793&action=review">https://bugs.webkit.org/attachment.cgi?id=305793&action=review</a>
<span class="quote">> Source/WebCore/ChangeLog:8
> + [link preload] Double downloads of preloaded content when it's in MemoryCache
> + <a class="bz_bug_link
bz_status_NEW "
title="NEW - [link preload] Double downloads of preloaded content when it's in MemoryCache"
href="show_bug.cgi?id=170122">https://bugs.webkit.org/show_bug.cgi?id=170122</a>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + No new tests, but unflaked http/tests/preload/single_download_preload_headers_charset.html.</span >
You should explain in the ChangeLog what problem this solves (that is causing the flakiness) and how.
<span class="quote">> Source/WebCore/loader/cache/CachedResource.cpp:-126
> - , m_hasUnknownEncoding(request.isLinkPreload())</span >
The existing behaviour is safe because it is limited to preloads. However this patch makes the encoding changes happen in other situations too.
<span class="quote">> Source/WebCore/loader/cache/CachedScript.cpp:61
> void CachedScript::setEncoding(const String& chs)
> {
> + TextEncoding previousEncoding = m_decoder->encoding();
> m_decoder->setEncoding(chs, TextResourceDecoder::EncodingFromHTTPHeader);
> + if (previousEncoding != m_decoder->encoding()) {
> + m_script = String();
> + m_scriptHash = 0;
> + m_decodingState = NeverDecoded;
> + }
> }</span >
I don't think this is safe. CachedScript might have existing clients that expect it to stay immutable. It may be impossible to reconstruct m_script after encoding change.</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>