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

Unified Diff: content/browser/browser_context.cc

Issue 2112683002: Null-check ThreadTaskRunnerHandle::Get() before doing Connect() in BC::Init() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: content/browser/browser_context.cc
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 98c5ef6961da9bfe7f50804e4e28e8d8556524a1..b0251f2d41d5a9d4e79ff943724983281db0bf53 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -17,6 +17,7 @@
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/rand_util.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/browser/download/download_manager_impl.h"
@@ -411,7 +412,7 @@ void BrowserContext::Initialize(
new base::SupportsUserData::Data);
MojoShellConnection* shell = MojoShellConnection::GetForProcess();
- if (shell) {
+ if (shell && base::ThreadTaskRunnerHandle::Get()) {
// NOTE: Many unit tests create a TestBrowserContext without initializing
// Mojo or the global Mojo shell connection.
« 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