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

Unified Diff: chrome/browser/android/compositor/tab_content_manager.cc

Issue 2497383002: Fix DCHECK failure when ChromeActivity#onPauseWithNative() is called many times quickly (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/compositor/tab_content_manager.cc
diff --git a/chrome/browser/android/compositor/tab_content_manager.cc b/chrome/browser/android/compositor/tab_content_manager.cc
index 12f582fee61c43047cd94e278dafa07285caa170..bdbdf1a306f2459fae294abbe31be80b7748de3f 100644
--- a/chrome/browser/android/compositor/tab_content_manager.cc
+++ b/chrome/browser/android/compositor/tab_content_manager.cc
@@ -217,13 +217,15 @@ void TabContentManager::CacheTab(JNIEnv* env,
content::WebContents* web_contents = tab_android->web_contents();
DCHECK(web_contents);
+ if (pending_tab_readbacks_.find(tab_id) != pending_tab_readbacks_.end())
+ return;
+
if (thumbnail_cache_->CheckAndUpdateThumbnailMetaData(tab_id, url)) {
if (!web_contents->GetRenderViewHost() ||
!web_contents->GetRenderViewHost()->GetWidget() ||
!web_contents->GetRenderViewHost()
->GetWidget()
->CanCopyFromBackingStore() ||
- pending_tab_readbacks_.find(tab_id) != pending_tab_readbacks_.end() ||
pending_tab_readbacks_.size() >= kMaxReadbacks) {
thumbnail_cache_->Remove(tab_id);
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698