Example #1
0
int
main(int argc, char** argv, char** envp)
{
#ifdef XP_MACOSX
    InitAutoreleasePool();
#endif

    // unbuffer stdout so that output is in the correct order; note that stderr
    // is unbuffered by default
    setbuf(stdout, 0);

#ifdef HAS_DLL_BLOCKLIST
    DllBlocklist_Initialize();
#endif

    int result = XRE_XPCShellMain(argc, argv, envp);

#ifdef XP_MACOSX
    FinishAutoreleasePool();
#endif

    return result;
}
Example #2
0
int
main(int argc, char** argv, char** envp)
{
#ifdef MOZ_WIDGET_GTK
    // A default display may or may not be required for xpcshell tests, and so
    // is not created here. Instead we set the command line args, which is a
    // fairly cheap operation.
    gtk_parse_args(&argc, &argv);
#endif

#ifdef XP_MACOSX
    InitAutoreleasePool();
#endif

    // unbuffer stdout so that output is in the correct order; note that stderr
    // is unbuffered by default
    setbuf(stdout, 0);

#ifdef HAS_DLL_BLOCKLIST
    DllBlocklist_Initialize();
#endif

    XREShellData shellData;
#if defined(XP_WIN) && defined(MOZ_SANDBOX)
    shellData.sandboxBrokerServices =
      mozilla::sandboxing::GetInitializedBrokerServices();
#endif

    int result = XRE_XPCShellMain(argc, argv, envp, &shellData);

#ifdef XP_MACOSX
    FinishAutoreleasePool();
#endif

    return result;
}