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

Unified Diff: components/bitmap_uploader/bitmap_uploader.cc

Issue 1942063002: Makes BitmapUploader early out if error encountered (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bitmap_uploader/bitmap_uploader.cc
diff --git a/components/bitmap_uploader/bitmap_uploader.cc b/components/bitmap_uploader/bitmap_uploader.cc
index 869ae84719e4563f419497791e28838b3dda8447..8f574805eb4c6b88f0ed44fdb6d771c5f286f0b2 100644
--- a/components/bitmap_uploader/bitmap_uploader.cc
+++ b/components/bitmap_uploader/bitmap_uploader.cc
@@ -82,6 +82,11 @@ void BitmapUploader::SetBitmap(int width,
}
void BitmapUploader::Upload() {
+ // If the |gpu_service_| has errored than we won't get far. Do nothing,
+ // assuming we are in shutdown.
+ if (gpu_service_.encountered_error())
+ return;
+
const gfx::Rect bounds(window_->bounds());
mus::mojom::PassPtr pass = mojo::CreateDefaultPass(1, bounds);
mus::mojom::CompositorFramePtr frame = mus::mojom::CompositorFrame::New();
« 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