| Index: chrome/renderer/safe_browsing/phishing_thumbnailer.cc
|
| diff --git a/chrome/renderer/safe_browsing/phishing_thumbnailer.cc b/chrome/renderer/safe_browsing/phishing_thumbnailer.cc
|
| index 3b98fea0fd580417e6a50225543891f6d62821e1..6df78d86c8c7c51d0d49a1d3afc456d4b10c1623 100644
|
| --- a/chrome/renderer/safe_browsing/phishing_thumbnailer.cc
|
| +++ b/chrome/renderer/safe_browsing/phishing_thumbnailer.cc
|
| @@ -32,12 +32,12 @@ SkBitmap GrabPhishingThumbnail(content::RenderView* render_view,
|
| }
|
| WebView* view = render_view->GetWebView();
|
| base::TimeTicks beginning_time = base::TimeTicks::Now();
|
| - SkCanvas* canvas = skia::CreatePlatformCanvas(view_size.width(),
|
| - view_size.height(), true, 0,
|
| - skia::RETURN_NULL_ON_FAILURE);
|
| + skia::RefPtr<SkCanvas> canvas = skia::AdoptRef(
|
| + skia::CreatePlatformCanvas(view_size.width(),
|
| + view_size.height(), true, 0,
|
| + skia::RETURN_NULL_ON_FAILURE));
|
| if (!canvas)
|
| return SkBitmap();
|
| - SkAutoUnref au(canvas);
|
|
|
| // Make sure we are not using any zoom when we take the snapshot. We will
|
| // restore the previous zoom level after the snapshot is taken.
|
| @@ -51,7 +51,7 @@ SkBitmap GrabPhishingThumbnail(content::RenderView* render_view,
|
| view->mainFrame()->setCanHaveScrollbars(false); // always hide scrollbars.
|
| view->resize(view_size);
|
| view->layout();
|
| - view->paint(webkit_glue::ToWebCanvas(canvas),
|
| + view->paint(webkit_glue::ToWebCanvas(canvas.get()),
|
| WebRect(0, 0, view_size.width(), view_size.height()));
|
|
|
| SkDevice* device = skia::GetTopDevice(*canvas);
|
|
|