From: Cheng Zhao Date: Wed, 20 Aug 2014 05:48:38 +0000 (+0800) Subject: Avoid calling GetRequestContext() in UI thread, fixes #591. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2bcb7393c48f2dab2c51e2768731e9b75b84bc8e;p=electron.git Avoid calling GetRequestContext() in UI thread, fixes #591. Since we can access job factory without touching the request context, there is no need to make sure GetRequestContext() is called before using the protocol module. --- diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index af63aad2..f919e4e3 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -13,10 +13,6 @@ #include "atom/common/node_bindings.h" #include "base/command_line.h" -#if defined(OS_WIN) -#include "ui/gfx/win/dpi.h" -#endif - #if defined(USE_X11) #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" #endif @@ -80,10 +76,6 @@ void AtomBrowserMainParts::PreMainMessageLoopRun() { libgtk2ui::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); #endif - // Make sure the url request job factory is created before the ready event. - static_cast(AtomBrowserContext::Get())-> - GetRequestContext(); - #if !defined(OS_MACOSX) // The corresponding call in OS X is in AtomApplicationDelegate. Browser::Get()->WillFinishLaunching();