Fix invoking ContentMain.

This commit is contained in:
Cheng Zhao 2014-06-30 11:44:05 +08:00
parent e0f263950e
commit d5b2a5af26
2 changed files with 13 additions and 3 deletions

View file

@ -10,6 +10,9 @@
#if defined(OS_MACOSX)
int AtomMain(int argc, const char* argv[]) {
atom::AtomMainDelegate delegate;
return content::ContentMain(content::ContentMainParams(&delegate));
content::ContentMainParams params(&delegate);
params.argc = argc;
params.argv = argv;
return content::ContentMain(params);
}
#endif // OS_MACOSX

View file

@ -98,7 +98,11 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
sandbox::SandboxInterfaceInfo sandbox_info = {0};
content::InitializeSandboxInfo(&sandbox_info);
atom::AtomMainDelegate delegate;
return content::ContentMain(content::ContentMainParams(&delegate));
content::ContentMainParams params(&delegate);
params.instance = instance;
params.sandbox_info = &sandbox_info;
return content::ContentMain(params);
}
#elif defined(OS_LINUX) // defined(OS_WIN)
@ -109,7 +113,10 @@ int main(int argc, const char* argv[]) {
return node::Start(argc, const_cast<char**>(argv));
atom::AtomMainDelegate delegate;
return content::ContentMain(content::ContentMainParams(&delegate));
content::ContentMainParams params(&delegate);
params.argc = argc;
params.argv = argv;
return content::ContentMain(params);
}
#else // defined(OS_LINUX)