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

Unified Diff: content/browser/devtools/devtools_agent_host_impl.cc

Issue 25571005: DevTools: Never instantiate DevToolsAgentHost on threads other than UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: content/browser/devtools/devtools_agent_host_impl.cc
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index 35111e9ab828725fc87f5be413cc13db19866c65..087004296d579fbaea6165192c6c1e3a4f356b91 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -10,6 +10,7 @@
#include "base/guid.h"
#include "base/lazy_instance.h"
#include "content/browser/devtools/devtools_manager_impl.h"
+#include "content/public/browser/browser_thread.h"
namespace content {
@@ -21,10 +22,12 @@ base::LazyInstance<Instances>::Leaky g_instances = LAZY_INSTANCE_INITIALIZER;
DevToolsAgentHostImpl::DevToolsAgentHostImpl()
: close_listener_(NULL),
id_(base::GenerateGUID()) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
g_instances.Get()[id_] = this;
}
DevToolsAgentHostImpl::~DevToolsAgentHostImpl() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
g_instances.Get().erase(g_instances.Get().find(id_));
}
« no previous file with comments | « chrome/browser/extensions/api/debugger/debugger_api.cc ('k') | content/browser/devtools/devtools_http_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698