From: Cheng Zhao Date: Mon, 30 Jun 2014 04:15:59 +0000 (+0800) Subject: Fix assertion caused by base::mac::AssignOverridePath. X-Git-Tag: v0.14.0~1^2~68 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2736b5dab3dadc4cbd32542e94686a7a952f2745;p=electron.git Fix assertion caused by base::mac::AssignOverridePath. --- diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index fa07016b..427423cc 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -6,14 +6,15 @@ #include +#include "atom/browser/atom_browser_client.h" +#include "atom/renderer/atom_renderer_client.h" #include "base/command_line.h" #include "base/debug/stack_trace.h" #include "base/logging.h" -#include "atom/browser/atom_browser_client.h" +#include "base/path_service.h" #include "content/public/common/content_switches.h" -#include "atom/renderer/atom_renderer_client.h" #include "ui/base/resource/resource_bundle.h" -#include "base/path_service.h" +#include "vendor/brightray/common/content_client.h" namespace atom { @@ -48,7 +49,14 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { base::debug::EnableInProcessStackDumping(); #endif - return brightray::MainDelegate::BasicStartupComplete(exit_code); + content_client_.reset(new brightray::ContentClient); + SetContentClient(content_client_.get()); + +#if defined(OS_MACOSX) + OverrideChildProcessPath(); + OverrideFrameworkBundlePath(); +#endif + return false; } void AtomMainDelegate::PreSandboxStartup() { diff --git a/atom/app/atom_main_delegate.h b/atom/app/atom_main_delegate.h index a8e3df9b..89d6ec7a 100644 --- a/atom/app/atom_main_delegate.h +++ b/atom/app/atom_main_delegate.h @@ -30,6 +30,7 @@ class AtomMainDelegate : public brightray::MainDelegate { virtual content::ContentRendererClient* CreateContentRendererClient() OVERRIDE; + scoped_ptr content_client_; scoped_ptr browser_client_; scoped_ptr renderer_client_;