Fix assertion caused by base::mac::AssignOverridePath.

This commit is contained in:
Cheng Zhao 2014-06-30 12:15:59 +08:00
parent d5b2a5af26
commit 2736b5dab3
2 changed files with 14 additions and 5 deletions

View file

@ -6,14 +6,15 @@
#include <string>
#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 "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 "content/public/common/content_switches.h"
#include "ui/base/resource/resource_bundle.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() {

View file

@ -30,6 +30,7 @@ class AtomMainDelegate : public brightray::MainDelegate {
virtual content::ContentRendererClient*
CreateContentRendererClient() OVERRIDE;
scoped_ptr<brightray::ContentClient> content_client_;
scoped_ptr<content::ContentBrowserClient> browser_client_;
scoped_ptr<content::ContentRendererClient> renderer_client_;