]> khamidou — GitHub mirrors - electron.git/commitdiff
Avoid calling GetRequestContext() in UI thread, fixes #591.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 20 Aug 2014 05:48:38 +0000 (13:48 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 20 Aug 2014 05:48:38 +0000 (13:48 +0800)
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.

atom/browser/atom_browser_main_parts.cc

index af63aad23a88de4ce162c7be3ed0fd65ac73299f..f919e4e3ab80124c978d54b0c46557714a57782e 100644 (file)
 #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<content::BrowserContext*>(AtomBrowserContext::Get())->
-      GetRequestContext();
-
 #if !defined(OS_MACOSX)
   // The corresponding call in OS X is in AtomApplicationDelegate.
   Browser::Get()->WillFinishLaunching();