js/xpconnect/shell/xpcshell.cpp

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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 }

mercurial