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

Unified Diff: cc/output/output_surface.cc

Issue 1949753007: Detach the output surface if bind fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: detach: . Created 4 years, 7 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 | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.cc
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index 30864f1ff548e45b767f22b9ace117173015a7a9..a2834e181ce5c0371927b82bae795794fcaabe1a 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -213,13 +213,10 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
}
}
- if (!success)
- client_ = NULL;
-
// In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
// Don't register a dump provider in these cases.
// TODO(ericrk): Get this working in Android Webview. crbug.com/517156
- if (client_ && base::ThreadTaskRunnerHandle::IsSet()) {
+ if (base::ThreadTaskRunnerHandle::IsSet()) {
// Now that we are on the context thread, register a dump provider with this
// thread's task runner. This will overwrite any previous dump provider
// registered.
@@ -227,6 +224,8 @@ bool OutputSurface::BindToClient(OutputSurfaceClient* client) {
this, "OutputSurface", base::ThreadTaskRunnerHandle::Get());
}
+ if (!success)
+ DetachFromClient();
return success;
}
« no previous file with comments | « no previous file | content/renderer/gpu/compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698