[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:21:37 PDT 2012


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





--- Comment #8 from Leo Yang <leoyang at rim.com>  2012-09-07 11:21:52 PST ---
(In reply to comment #6)
> (From update of attachment 162812 [details])
> 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

Unless there are 2 same namespaces with different fallback urls.

-- 
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