[Webkit-unassigned] [Bug 96126] Appcache fallback URL match should use the longest candidate

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 7 11:03:50 PDT 2012


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





--- Comment #6 from Yong Li <yoli at rim.com>  2012-09-07 11:04:05 PST ---
(From update of attachment 162812)
View in context: https://bugs.webkit.org/attachment.cgi?id=162812&action=review

> Source/WebCore/loader/appcache/ApplicationCache.cpp:173
>  void ApplicationCache::setFallbackURLs(const FallbackURLVector& fallbackURLs)
>  {
>      ASSERT(m_fallbackURLs.isEmpty());
>      m_fallbackURLs = fallbackURLs;
> +    std::sort(m_fallbackURLs.begin(), m_fallbackURLs.end(), FallbackURLGreaterThan());
>  }
>  

A silly question: would a std::stable_sort be better here? it will be slower, but keep the original order unchanged as long as possible

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list