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

Unified Diff: content/browser/frame_host/navigation_entry_screenshot_manager.cc

Issue 213413005: Ensure RenderViewHost is not shut down until a screenshot of the page is taken. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing some unit tests. Created 6 years, 9 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
Index: content/browser/frame_host/navigation_entry_screenshot_manager.cc
diff --git a/content/browser/frame_host/navigation_entry_screenshot_manager.cc b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
index 1e066323ea29f8bc3489be9fb0b9554d73b36987..abe720df462a376901c71d3b4b0d30d86fcb4e4f 100644
--- a/content/browser/frame_host/navigation_entry_screenshot_manager.cc
+++ b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
@@ -169,8 +169,7 @@ void NavigationEntryScreenshotManager::OnScreenshotTaken(int unique_id,
}
if (!success || bitmap.empty() || bitmap.isNull()) {
- if (!ClearScreenshot(entry))
- OnScreenshotSet(entry);
+ ClearScreenshot(entry);
return;
}
@@ -215,8 +214,8 @@ void NavigationEntryScreenshotManager::OnScreenshotEncodeComplete(
void NavigationEntryScreenshotManager::OnScreenshotSet(
NavigationEntryImpl* entry) {
- if (entry->screenshot().get())
- PurgeScreenshotsIfNecessary();
+ CHECK(entry->screenshot().get());
+ PurgeScreenshotsIfNecessary();
}
bool NavigationEntryScreenshotManager::ClearScreenshot(

Powered by Google App Engine
This is Rietveld 408576698