Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim: set ts=8 sts=4 et sw=4 tw=99: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* XPConnect JavaScript interactive shell. */
9 #include <stdio.h>
11 #include "mozilla/WindowsDllBlocklist.h"
13 #include "nsXULAppAPI.h"
14 #ifdef XP_MACOSX
15 #include "xpcshellMacUtils.h"
16 #endif
17 #ifdef XP_WIN
18 #include <windows.h>
19 #include <shlobj.h>
21 // we want a wmain entry point
22 #define XRE_DONT_PROTECT_DLL_LOAD
23 #define XRE_WANT_ENVIRON
24 #include "nsWindowsWMain.cpp"
25 #endif
27 int
28 main(int argc, char** argv, char** envp)
29 {
30 #ifdef XP_MACOSX
31 InitAutoreleasePool();
32 #endif
34 // unbuffer stdout so that output is in the correct order; note that stderr
35 // is unbuffered by default
36 setbuf(stdout, 0);
38 #ifdef HAS_DLL_BLOCKLIST
39 DllBlocklist_Initialize();
40 #endif
42 int result = XRE_XPCShellMain(argc, argv, envp);
44 #ifdef XP_MACOSX
45 FinishAutoreleasePool();
46 #endif
48 return result;
49 }