Bug 441324, part 1: Shuffle around includes to avoid problems with #define malloc et al. r=bsmedberg

This commit is contained in:
Chris Jones 2010-03-03 23:02:55 -06:00
Родитель 090be2f360
Коммит a7ca970622
17 изменённых файлов: 45 добавлений и 57 удалений

Просмотреть файл

@ -41,6 +41,7 @@
* A class that handles loading and evaluation of <script> elements.
*/
#include "jscntxt.h"
#include "nsScriptLoader.h"
#include "nsIDOMCharacterData.h"
#include "nsParserUtils.h"
@ -60,7 +61,6 @@
#include "nsIScriptElement.h"
#include "nsIDOMHTMLScriptElement.h"
#include "nsIDocShell.h"
#include "jscntxt.h"
#include "nsContentUtils.h"
#include "nsUnicharUtils.h"
#include "nsAutoPtr.h"

Просмотреть файл

@ -47,6 +47,7 @@
* see http://developer.mozilla.org/en/docs/XUL
*/
#include "jscntxt.h" // for JSVERSION_HAS_XML
#include "nsXULContentSink.h"
#include "nsCOMPtr.h"
#include "nsForwardReference.h"
@ -79,7 +80,6 @@
#include "nsXULElement.h"
#include "prlog.h"
#include "prmem.h"
#include "jscntxt.h" // for JSVERSION_HAS_XML
#include "nsCRT.h"
#include "nsXULPrototypeDocument.h" // XXXbe temporary

Просмотреть файл

@ -37,6 +37,13 @@
*
* ***** END LICENSE BLOCK ***** */
// JavaScript includes
#include "jsapi.h"
#include "jsprvtd.h" // we are using private JS typedefs...
#include "jscntxt.h"
#include "jsdbgapi.h"
#include "jsnum.h"
#include "nscore.h"
#include "nsDOMClassInfo.h"
#include "nsCRT.h"
@ -62,13 +69,6 @@
#include "nsIRunnable.h"
#include "nsThreadUtils.h"
// JavaScript includes
#include "jsapi.h"
#include "jsprvtd.h" // we are using private JS typedefs...
#include "jscntxt.h"
#include "jsdbgapi.h"
#include "jsnum.h"
// General helper includes
#include "nsGlobalWindow.h"
#include "nsIContent.h"

Просмотреть файл

@ -37,6 +37,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "jscntxt.h"
#include "nsJSEnvironment.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptObjectPrincipal.h"
@ -76,7 +77,6 @@
#include "nsITimer.h"
#include "nsIAtom.h"
#include "nsContentUtils.h"
#include "jscntxt.h"
#include "nsEventDispatcher.h"
#include "nsIContent.h"
#include "nsCycleCollector.h"

Просмотреть файл

@ -37,6 +37,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "jscntxt.h"
#include "nsDOMThreadService.h"
// Interfaces
@ -60,7 +62,6 @@
#include "nsPIDOMWindow.h"
// Other includes
#include "jscntxt.h"
#include "nsAutoLock.h"
#include "nsAutoPtr.h"
#include "nsContentUtils.h"

Просмотреть файл

@ -39,6 +39,9 @@
#include "npapi.h"
#include "jsapi.h"
#include "jscntxt.h"
#include "nsISupports.h"
#ifdef MOZ_ACTIVEX_PLUGIN_XPCONNECT
@ -58,8 +61,6 @@
#include "nsIScriptContext.h"
#include "nsIURI.h"
#include "nsIJSContextStack.h"
#include "jsapi.h"
#include "jscntxt.h"
#include "nsIScriptSecurityManager.h"
#endif

Просмотреть файл

@ -38,10 +38,10 @@
*
* ***** END LICENSE BLOCK ***** */
#include "jscntxt.h"
#include "Function.h"
#include "Library.h"
#include "nsAutoPtr.h"
#include "jscntxt.h"
namespace mozilla {
namespace ctypes {

Просмотреть файл

@ -37,10 +37,10 @@
*
* ***** END LICENSE BLOCK ***** */
#include "jsd_xpc.h"
#include "jsdbgapi.h"
#include "jscntxt.h"
#include "jsfun.h"
#include "jsd_xpc.h"
#include "nsIXPConnect.h"
#include "nsIGenericFactory.h"

Просмотреть файл

@ -46,6 +46,10 @@
/* XPConnect JavaScript interactive shell. */
#include <stdio.h>
#include "jsapi.h"
#include "jscntxt.h"
#include "jsdbgapi.h"
#include "jsprf.h"
#include "nsXULAppAPI.h"
#include "nsServiceManagerUtils.h"
#include "nsComponentManagerUtils.h"
@ -64,9 +68,6 @@
#include "nsILocalFile.h"
#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
#include "jsapi.h"
#include "jsdbgapi.h"
#include "jsprf.h"
#include "nscore.h"
#include "nsArrayEnumerator.h"
#include "nsCOMArray.h"
@ -529,9 +530,6 @@ DumpXPC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return JS_TRUE;
}
/* XXX needed only by GC() */
#include "jscntxt.h"
static JSBool
GC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{

Просмотреть файл

@ -1529,6 +1529,11 @@ stubTopTemplate = '''\
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
#include "jsapi.h"
#include "jscntxt.h"
/* Include nanojit.h early to avoid conflicting with nscore's |#define free|.
* NB: needs to be kept in sync with jsbuiltins.h */
#ifdef JS_TRACER
# include "nanojit/nanojit.h"
#endif
#include "prtypes.h"
#include "nsID.h"
#include "%s"

Просмотреть файл

@ -34,8 +34,8 @@
*
* ***** END LICENSE BLOCK ***** */
#include "xpcJSWeakReference.h"
#include "xpcprivate.h"
#include "xpcJSWeakReference.h"
xpcJSWeakReference::xpcJSWeakReference()
{

Просмотреть файл

@ -50,6 +50,14 @@
#include <stdlib.h>
#include <stdarg.h>
#include <math.h>
#include "jsapi.h"
#include "jsdhash.h"
#include "jsprf.h"
#include "prprf.h"
#include "jsinterp.h"
#include "jscntxt.h"
#include "jsdbgapi.h"
#include "jsgc.h"
#include "nscore.h"
#include "nsXPCOM.h"
#include "nsAutoPtr.h"
@ -74,14 +82,6 @@
#include "nsIModule.h"
#include "nsAutoLock.h"
#include "nsXPTCUtils.h"
#include "jsapi.h"
#include "jsdhash.h"
#include "jsprf.h"
#include "prprf.h"
#include "jsinterp.h"
#include "jscntxt.h"
#include "jsdbgapi.h"
#include "jsgc.h"
#include "xptinfo.h"
#include "xpcforwards.h"
#include "xpclog.h"

Просмотреть файл

@ -44,6 +44,9 @@
#include <ctype.h>
#include <stdarg.h>
#include "jsapi.h"
#include "jscntxt.h"
#include "nsComponentManagerUtils.h"
#include "nsServiceManagerUtils.h"
#include "nsIXPConnect.h"
@ -60,9 +63,6 @@
#include "nsStringAPI.h"
#include "nsEmbedString.h"
#include "jsapi.h"
#include "jscntxt.h"
#include "xpctest.h"
/***************************************************************************/

Просмотреть файл

@ -36,6 +36,9 @@
*
* ***** END LICENSE BLOCK ***** */
// FIXME(bug 332648): Give me a real API please!
#include "jscntxt.h"
#include "nsJSNPRuntime.h"
#include "nsNPAPIPlugin.h"
#include "nsNPAPIPluginInstance.h"
@ -50,9 +53,6 @@
#include "prmem.h"
#include "nsIContent.h"
// FIXME(bug 332648): Give me a real API please!
#include "jscntxt.h"
using namespace mozilla::plugins::parent;
// Hash of JSObject wrappers that wraps JSObjects as NPObjects. There

Просмотреть файл

@ -44,6 +44,9 @@
#include "prmem.h"
#include "prenv.h"
#include "prclist.h"
#include "jscntxt.h"
#include "nsAutoLock.h"
#include "nsNPAPIPlugin.h"
#include "nsNPAPIPluginInstance.h"
@ -70,8 +73,6 @@
#include "nsDOMJSUtils.h"
#include "nsIPrincipal.h"
#include "jscntxt.h"
#include "nsIXPConnect.h"
#include "nsIObserverService.h"

Просмотреть файл

@ -342,10 +342,6 @@ nsGTKRemoteService::HandleCommand(char* aCommand, nsIDOMWindow* aWindow,
command.Trim(" ", PR_TRUE, PR_TRUE);
ToLowerCase(command);
#ifdef DEBUG_bsmedberg
printf("Processing xremote command: %s\n", command.get());
#endif
if (!command.EqualsLiteral("ping")) {
nsCAutoString desktopStartupID;
nsDependentCString cmd(aCommand);
@ -393,13 +389,6 @@ nsGTKRemoteService::HandleCommandLine(char* aBuffer, nsIDOMWindow* aWindow,
PRInt32 argc = TO_LITTLE_ENDIAN32(*reinterpret_cast<PRInt32*>(aBuffer));
char *wd = aBuffer + ((argc + 1) * sizeof(PRInt32));
#ifdef DEBUG_bsmedberg
printf("Receiving command line:\n"
" wd:\t%s\n"
" argc:\t%i\n",
wd, argc);
#endif
nsCOMPtr<nsILocalFile> lf;
rv = NS_NewNativeLocalFile(nsDependentCString(wd), PR_TRUE,
getter_AddRefs(lf));
@ -422,9 +411,6 @@ nsGTKRemoteService::HandleCommandLine(char* aBuffer, nsIDOMWindow* aWindow,
cmd, ' ',
&desktopStartupID);
}
#ifdef DEBUG_bsmedberg
printf(" argv[%i]:\t%s\n", i, argv[i]);
#endif
}
rv = cmdline->Init(argc, argv, lf, nsICommandLine::STATE_REMOTE_AUTO);
@ -525,10 +511,6 @@ nsGTKRemoteService::HandlePropertyChange(GtkWidget *aWidget,
(we only care
about the first ) */
#ifdef DEBUG_bsmedberg
printf("Handling command: %s\n", data);
#endif
// Failed to get property off the window?
if (result != Success)
return FALSE;

Просмотреть файл

@ -38,6 +38,7 @@
*
* ***** END LICENSE BLOCK ***** */
#include "jscntxt.h"
#include "nscore.h"
#include "plstr.h"
#include "nsXPITriggerInfo.h"
@ -50,7 +51,6 @@
#include "nsIScriptSecurityManager.h"
#include "nsICryptoHash.h"
#include "nsIX509Cert.h"
#include "jscntxt.h"
//
// nsXPITriggerItem