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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 655963002: gpu: Fix webview parent compositor crash in context loss (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: gpu/command_buffer/service/in_process_command_buffer.cc
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc
index 1d0ce6a8246e4e6c66d448b198d186be02043922..310fcedcccb18385bb1b7c84d57f8ddb545c0f3f 100644
--- a/gpu/command_buffer/service/in_process_command_buffer.cc
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc
@@ -747,7 +747,9 @@ namespace {
void PostCallback(const scoped_refptr<base::MessageLoopProxy>& loop,
const base::Closure& callback) {
- if (!loop->BelongsToCurrentThread()) {
+ // The loop.get() check is to support using InProcessCommandBuffer on a thread
+ // without a message loop.
+ if (loop.get() && !loop->BelongsToCurrentThread()) {
loop->PostTask(FROM_HERE, callback);
} else {
callback.Run();
« 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