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

Unified Diff: content/browser/web_contents/navigation_entry_impl.cc

Issue 11958002: overscroll: Make sure screenshot for a NavigationEntry gets reset properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/navigation_entry_impl.cc
diff --git a/content/browser/web_contents/navigation_entry_impl.cc b/content/browser/web_contents/navigation_entry_impl.cc
index d647b8fb16b80dc12e491c1c90e04825f5bdcf15..61836db1e4325317a3a4cb308cfaa4831c8ded9e 100644
--- a/content/browser/web_contents/navigation_entry_impl.cc
+++ b/content/browser/web_contents/navigation_entry_impl.cc
@@ -273,7 +273,7 @@ bool NavigationEntryImpl::GetCanLoadLocalResources() const {
void NavigationEntryImpl::SetScreenshotPNGData(
const std::vector<unsigned char>& png_data) {
- screenshot_ = new base::RefCountedBytes(png_data);
+ screenshot_ = png_data.empty() ? NULL : new base::RefCountedBytes(png_data);
}
} // namespace content
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698