Changeset 167741 in webkit


Ignore:
Timestamp:
Apr 23, 2014 8:43:47 PM (10 years ago)
Author:
akling@apple.com
Message:

Canvas cache of clean URLs can grow without bounds.
<https://webkit.org/b/132091>
<rdar://problem/16695665>

Remove a silly "optimization" that kept a cache of clean URLs
that can be drawn into a canvas without tainting it, all to avoid
the "expensive" checks to determine whether it would taint.

Reviewed by Benjamin Poulain.

  • html/canvas/CanvasRenderingContext.cpp:

(WebCore::CanvasRenderingContext::wouldTaintOrigin):

  • html/canvas/CanvasRenderingContext.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167735 r167741  
     12014-04-23  Andreas Kling  <akling@apple.com>
     2
     3        Canvas cache of clean URLs can grow without bounds.
     4        <https://webkit.org/b/132091>
     5        <rdar://problem/16695665>
     6
     7        Remove a silly "optimization" that kept a cache of clean URLs
     8        that can be drawn into a canvas without tainting it, all to avoid
     9        the "expensive" checks to determine whether it would taint.
     10
     11        Reviewed by Benjamin Poulain.
     12
     13        * html/canvas/CanvasRenderingContext.cpp:
     14        (WebCore::CanvasRenderingContext::wouldTaintOrigin):
     15        * html/canvas/CanvasRenderingContext.h:
     16
    1172014-04-23  Benjamin Poulain  <bpoulain@apple.com>
    218
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext.cpp

    r165676 r167741  
    9393bool CanvasRenderingContext::wouldTaintOrigin(const URL& url)
    9494{
    95     if (!canvas()->originClean() || m_cleanURLs.contains(url.string()))
     95    if (!canvas()->originClean())
    9696        return false;
    9797
     
    102102        return false;
    103103
    104     m_cleanURLs.add(url.string());
    105104    return false;
    106105}
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext.h

    r165676 r167741  
    7676private:
    7777    HTMLCanvasElement* m_canvas;
    78     HashSet<String> m_cleanURLs;
    7978};
    8079
Note: See TracChangeset for help on using the changeset viewer.