Run user's main script before everything is initialized, fixes #543.
This commit is contained in:
parent
139316b975
commit
33580f66df
1 changed files with 6 additions and 5 deletions
|
@ -65,17 +65,18 @@ void AtomBrowserMainParts::PostEarlyInitialization() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomBrowserMainParts::PreMainMessageLoopRun() {
|
void AtomBrowserMainParts::PreMainMessageLoopRun() {
|
||||||
|
// Run user's main script before most things get initialized, so we can have
|
||||||
|
// a chance to setup everything.
|
||||||
|
node_bindings_->PrepareMessageLoop();
|
||||||
|
node_bindings_->RunMessageLoop();
|
||||||
|
|
||||||
brightray::BrowserMainParts::PreMainMessageLoopRun();
|
brightray::BrowserMainParts::PreMainMessageLoopRun();
|
||||||
|
|
||||||
#if defined(USE_X11)
|
#if defined(USE_X11)
|
||||||
libgtk2ui::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
|
libgtk2ui::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
node_bindings_->PrepareMessageLoop();
|
// Make sure the url request job factory is created before the ready event.
|
||||||
node_bindings_->RunMessageLoop();
|
|
||||||
|
|
||||||
// Make sure the url request job factory is created before the
|
|
||||||
// will-finish-launching event.
|
|
||||||
static_cast<content::BrowserContext*>(AtomBrowserContext::Get())->
|
static_cast<content::BrowserContext*>(AtomBrowserContext::Get())->
|
||||||
GetRequestContext();
|
GetRequestContext();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue