From ab4fa9899ebb3291abdc05141c02e2c9779f86d9 Mon Sep 17 00:00:00 2001 From: bridiver Date: Mon, 12 Feb 2018 11:01:08 -0700 Subject: [PATCH] ensure that `session-created` fires for the main browser context fix https://github.com/brave/browser-laptop/issues/13090 --- atom/browser/atom_browser_main_parts.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index 7aac0faac3..aa48e8112d 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -328,9 +328,6 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() { OSCrypt::SetConfig(std::move(config)); #endif - browser_context_ = ProfileManager::GetActiveUserProfile(); - brightray::BrowserMainParts::PreMainMessageLoopRun(); - js_env_.reset(new JavascriptEnvironment); js_env_->isolate()->Enter(); @@ -359,6 +356,9 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() { node_bindings_->PrepareMessageLoop(); node_bindings_->RunMessageLoop(); + browser_context_ = ProfileManager::GetActiveUserProfile(); + brightray::BrowserMainParts::PreMainMessageLoopRun(); + #if defined(USE_X11) libgtkui::GtkInitFromCommandLine(*base::CommandLine::ForCurrentProcess()); #endif