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

Unified Diff: blimp/client/core/compositor/blimp_compositor_dependencies.cc

Issue 2320923002: Add a full Blimp integration test. (Closed)
Patch Set: Fixed this a bit more. Still some thread violations :(. Created 4 years, 3 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: blimp/client/core/compositor/blimp_compositor_dependencies.cc
diff --git a/blimp/client/core/compositor/blimp_compositor_dependencies.cc b/blimp/client/core/compositor/blimp_compositor_dependencies.cc
index a765adbfba8760391aee2775f6e49a39e8bfc869..60d4d05598cd4c9c9243029d1fdc170411cce8c0 100644
--- a/blimp/client/core/compositor/blimp_compositor_dependencies.cc
+++ b/blimp/client/core/compositor/blimp_compositor_dependencies.cc
@@ -9,6 +9,7 @@
#include "base/memory/ptr_util.h"
#include "base/threading/simple_thread.h"
#include "base/threading/thread.h"
+#include "base/threading/thread_restrictions.h"
#include "blimp/client/core/compositor/blob_image_serialization_processor.h"
#include "blimp/client/public/compositor/compositor_dependencies.h"
#include "blimp/client/support/compositor/blimp_layer_tree_settings.h"
@@ -26,7 +27,13 @@ class BlimpTaskGraphRunner : public cc::SingleThreadTaskGraphRunner {
base::SimpleThread::Options(base::ThreadPriority::BACKGROUND));
}
- ~BlimpTaskGraphRunner() override { Shutdown(); }
+ ~BlimpTaskGraphRunner() override {
+ // PlatformThread::Join() ends up relying on IO. Temporarily allow this
+ // during shutdown.
+ // TODO(me): Sigh... try to fix this before landing :(.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ Shutdown();
Khushal 2016/09/13 04:47:23 I think you're fine doing this. The content code a
David Trainor- moved to gerrit 2016/09/13 06:18:04 Acknowledged.
+ }
private:
DISALLOW_COPY_AND_ASSIGN(BlimpTaskGraphRunner);
@@ -40,8 +47,13 @@ BlimpCompositorDependencies::BlimpCompositorDependencies(
}
BlimpCompositorDependencies::~BlimpCompositorDependencies() {
- if (compositor_impl_thread_)
+ if (compositor_impl_thread_) {
+ // PlatformThread::Join() ends up relying on IO. Temporarily allow this
+ // during shutdown.
+ // TODO(me): Sigh... try to fix this before landing :(.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
compositor_impl_thread_->Stop();
+ }
}
CompositorDependencies* BlimpCompositorDependencies::GetEmbedderDependencies() {

Powered by Google App Engine
This is Rietveld 408576698