Disable renderer sandbox.
This commit is contained in:
Родитель
4c0a162963
Коммит
34c4d734af
|
@ -4,7 +4,9 @@
|
|||
|
||||
#include "app/atom_main_delegate.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "browser/atom_browser_client.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "renderer/atom_renderer_client.h"
|
||||
|
||||
namespace atom {
|
||||
|
@ -15,6 +17,14 @@ AtomMainDelegate::AtomMainDelegate() {
|
|||
AtomMainDelegate::~AtomMainDelegate() {
|
||||
}
|
||||
|
||||
void AtomMainDelegate::PreSandboxStartup() {
|
||||
brightray::MainDelegate::PreSandboxStartup();
|
||||
|
||||
// Disable renderer sandbox for most of node's functions.
|
||||
CommandLine* command_line = CommandLine::ForCurrentProcess();
|
||||
command_line->AppendSwitch(switches::kNoSandbox);
|
||||
}
|
||||
|
||||
content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() {
|
||||
browser_client_.reset(new AtomBrowserClient);
|
||||
return browser_client_.get();
|
||||
|
|
|
@ -14,6 +14,9 @@ class AtomMainDelegate : public brightray::MainDelegate {
|
|||
AtomMainDelegate();
|
||||
~AtomMainDelegate();
|
||||
|
||||
protected:
|
||||
virtual void PreSandboxStartup() OVERRIDE;
|
||||
|
||||
private:
|
||||
virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
|
||||
virtual content::ContentRendererClient*
|
||||
|
|
Загрузка…
Ссылка в новой задаче