Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Issue 10441007: Merge 117376 (Closed)

Created:
8 years, 7 months ago by Chris Evans
Modified:
8 years, 7 months ago
Reviewers:
jamesr1
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Visibility:
Public.

Description

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -1 line) Patch
M Source/WebCore/loader/cache/CachedImage.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/loader/cache/CachedImage.cpp View 3 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Chris Evans
8 years, 7 months ago (2012-05-24 01:49:29 UTC) #1
jamesr1
8 years, 7 months ago (2012-05-24 01:56:30 UTC) #2
Lgtm
On May 23, 2012 6:49 PM, <cevans@chromium.org> wrote:

> Reviewers: jamesr_google.com,
>
> Description:
> Merge 117376
> BUG=128497
>
> Please review this at
https://chromiumcodereview.**appspot.com/10441007/<https://chromiumcodereview...
>
> SVN Base: http://svn.webkit.org/**repository/webkit/branches/**
>
chromium/1132/<http://svn.webkit.org/repository/webkit/branches/chromium/1132/>
>
> Affected files:
>  M     Source/WebCore/loader/cache/**CachedImage.h
>  M     Source/WebCore/loader/cache/**CachedImage.cpp
>
>
> Index: Source/WebCore/loader/cache/**CachedImage.cpp
> ==============================**==============================**=======
> --- Source/WebCore/loader/cache/**CachedImage.cpp (revision 118299)
> +++ Source/WebCore/loader/cache/**CachedImage.cpp (working copy)
> @@ -75,6 +75,7 @@
>
>  CachedImage::~CachedImage()
>  {
> +    clearImage();
>  }
>
>  void CachedImage::**decodedDataDeletionTimerFired(**Timer<CachedImage>*)
> @@ -302,7 +303,7 @@
>  #if ENABLE(SVG)
>     m_svgImageCache.clear();
>  #endif
> -    m_image = 0;
> +    clearImage();
>     setEncodedSize(0);
>  }
>
> @@ -328,6 +329,15 @@
>     m_image = BitmapImage::create(this);
>  }
>
> +inline void CachedImage::clearImage()
> +{
> +    // If our Image has an observer, it's always us so we need to clear
> the back pointer
> +    // before dropping our reference.
> +    if (m_image)
> +        m_image->setImageObserver(0);
> +    m_image.clear();
> +}
> +
>  size_t CachedImage::**maximumDecodedImageSize()
>  {
>     if (!m_loader || m_loader->**reachedTerminalState())
> Index: Source/WebCore/loader/cache/**CachedImage.h
> ==============================**==============================**=======
> --- Source/WebCore/loader/cache/**CachedImage.h   (revision 118299)
> +++ Source/WebCore/loader/cache/**CachedImage.h   (working copy)
> @@ -98,6 +98,7 @@
>     void clear();
>
>     void createImage();
> +    void clearImage();
>     size_t maximumDecodedImageSize();
>     // If not null, changeRect is the changed part of the image.
>     void notifyObservers(const IntRect* changeRect = 0);
>
>
>

Powered by Google App Engine
This is Rietveld 408576698