forked from mirrors/gecko-dev
Bug 441324, part 1: Shuffle around includes to avoid problems with #define malloc et al. r=bsmedberg
This commit is contained in:
parent
090be2f360
commit
a7ca970622
17 changed files with 45 additions and 57 deletions
|
|
@ -41,6 +41,7 @@
|
||||||
* A class that handles loading and evaluation of <script> elements.
|
* A class that handles loading and evaluation of <script> elements.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "jscntxt.h"
|
||||||
#include "nsScriptLoader.h"
|
#include "nsScriptLoader.h"
|
||||||
#include "nsIDOMCharacterData.h"
|
#include "nsIDOMCharacterData.h"
|
||||||
#include "nsParserUtils.h"
|
#include "nsParserUtils.h"
|
||||||
|
|
@ -60,7 +61,6 @@
|
||||||
#include "nsIScriptElement.h"
|
#include "nsIScriptElement.h"
|
||||||
#include "nsIDOMHTMLScriptElement.h"
|
#include "nsIDOMHTMLScriptElement.h"
|
||||||
#include "nsIDocShell.h"
|
#include "nsIDocShell.h"
|
||||||
#include "jscntxt.h"
|
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsUnicharUtils.h"
|
#include "nsUnicharUtils.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
* see http://developer.mozilla.org/en/docs/XUL
|
* see http://developer.mozilla.org/en/docs/XUL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "jscntxt.h" // for JSVERSION_HAS_XML
|
||||||
#include "nsXULContentSink.h"
|
#include "nsXULContentSink.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsForwardReference.h"
|
#include "nsForwardReference.h"
|
||||||
|
|
@ -79,7 +80,6 @@
|
||||||
#include "nsXULElement.h"
|
#include "nsXULElement.h"
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#include "jscntxt.h" // for JSVERSION_HAS_XML
|
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
|
|
||||||
#include "nsXULPrototypeDocument.h" // XXXbe temporary
|
#include "nsXULPrototypeDocument.h" // XXXbe temporary
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,13 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** 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 "nscore.h"
|
||||||
#include "nsDOMClassInfo.h"
|
#include "nsDOMClassInfo.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
|
|
@ -62,13 +69,6 @@
|
||||||
#include "nsIRunnable.h"
|
#include "nsIRunnable.h"
|
||||||
#include "nsThreadUtils.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
|
// General helper includes
|
||||||
#include "nsGlobalWindow.h"
|
#include "nsGlobalWindow.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
#include "jscntxt.h"
|
||||||
#include "nsJSEnvironment.h"
|
#include "nsJSEnvironment.h"
|
||||||
#include "nsIScriptGlobalObject.h"
|
#include "nsIScriptGlobalObject.h"
|
||||||
#include "nsIScriptObjectPrincipal.h"
|
#include "nsIScriptObjectPrincipal.h"
|
||||||
|
|
@ -76,7 +77,6 @@
|
||||||
#include "nsITimer.h"
|
#include "nsITimer.h"
|
||||||
#include "nsIAtom.h"
|
#include "nsIAtom.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "jscntxt.h"
|
|
||||||
#include "nsEventDispatcher.h"
|
#include "nsEventDispatcher.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsCycleCollector.h"
|
#include "nsCycleCollector.h"
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
#include "jscntxt.h"
|
||||||
|
|
||||||
#include "nsDOMThreadService.h"
|
#include "nsDOMThreadService.h"
|
||||||
|
|
||||||
// Interfaces
|
// Interfaces
|
||||||
|
|
@ -60,7 +62,6 @@
|
||||||
#include "nsPIDOMWindow.h"
|
#include "nsPIDOMWindow.h"
|
||||||
|
|
||||||
// Other includes
|
// Other includes
|
||||||
#include "jscntxt.h"
|
|
||||||
#include "nsAutoLock.h"
|
#include "nsAutoLock.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@
|
||||||
|
|
||||||
#include "npapi.h"
|
#include "npapi.h"
|
||||||
|
|
||||||
|
#include "jsapi.h"
|
||||||
|
#include "jscntxt.h"
|
||||||
|
|
||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
|
|
||||||
#ifdef MOZ_ACTIVEX_PLUGIN_XPCONNECT
|
#ifdef MOZ_ACTIVEX_PLUGIN_XPCONNECT
|
||||||
|
|
@ -58,8 +61,6 @@
|
||||||
#include "nsIScriptContext.h"
|
#include "nsIScriptContext.h"
|
||||||
#include "nsIURI.h"
|
#include "nsIURI.h"
|
||||||
#include "nsIJSContextStack.h"
|
#include "nsIJSContextStack.h"
|
||||||
#include "jsapi.h"
|
|
||||||
#include "jscntxt.h"
|
|
||||||
#include "nsIScriptSecurityManager.h"
|
#include "nsIScriptSecurityManager.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,10 +38,10 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
#include "jscntxt.h"
|
||||||
#include "Function.h"
|
#include "Function.h"
|
||||||
#include "Library.h"
|
#include "Library.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "jscntxt.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace ctypes {
|
namespace ctypes {
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include "jsd_xpc.h"
|
|
||||||
#include "jsdbgapi.h"
|
#include "jsdbgapi.h"
|
||||||
#include "jscntxt.h"
|
#include "jscntxt.h"
|
||||||
#include "jsfun.h"
|
#include "jsfun.h"
|
||||||
|
#include "jsd_xpc.h"
|
||||||
|
|
||||||
#include "nsIXPConnect.h"
|
#include "nsIXPConnect.h"
|
||||||
#include "nsIGenericFactory.h"
|
#include "nsIGenericFactory.h"
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,10 @@
|
||||||
/* XPConnect JavaScript interactive shell. */
|
/* XPConnect JavaScript interactive shell. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "jsapi.h"
|
||||||
|
#include "jscntxt.h"
|
||||||
|
#include "jsdbgapi.h"
|
||||||
|
#include "jsprf.h"
|
||||||
#include "nsXULAppAPI.h"
|
#include "nsXULAppAPI.h"
|
||||||
#include "nsServiceManagerUtils.h"
|
#include "nsServiceManagerUtils.h"
|
||||||
#include "nsComponentManagerUtils.h"
|
#include "nsComponentManagerUtils.h"
|
||||||
|
|
@ -64,9 +68,6 @@
|
||||||
#include "nsILocalFile.h"
|
#include "nsILocalFile.h"
|
||||||
#include "nsDirectoryServiceDefs.h"
|
#include "nsDirectoryServiceDefs.h"
|
||||||
#include "nsAppDirectoryServiceDefs.h"
|
#include "nsAppDirectoryServiceDefs.h"
|
||||||
#include "jsapi.h"
|
|
||||||
#include "jsdbgapi.h"
|
|
||||||
#include "jsprf.h"
|
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include "nsArrayEnumerator.h"
|
#include "nsArrayEnumerator.h"
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
|
|
@ -529,9 +530,6 @@ DumpXPC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX needed only by GC() */
|
|
||||||
#include "jscntxt.h"
|
|
||||||
|
|
||||||
static JSBool
|
static JSBool
|
||||||
GC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
GC(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1529,6 +1529,11 @@ stubTopTemplate = '''\
|
||||||
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
|
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
|
||||||
#include "jsapi.h"
|
#include "jsapi.h"
|
||||||
#include "jscntxt.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 "prtypes.h"
|
||||||
#include "nsID.h"
|
#include "nsID.h"
|
||||||
#include "%s"
|
#include "%s"
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include "xpcJSWeakReference.h"
|
|
||||||
#include "xpcprivate.h"
|
#include "xpcprivate.h"
|
||||||
|
#include "xpcJSWeakReference.h"
|
||||||
|
|
||||||
xpcJSWeakReference::xpcJSWeakReference()
|
xpcJSWeakReference::xpcJSWeakReference()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <math.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 "nscore.h"
|
||||||
#include "nsXPCOM.h"
|
#include "nsXPCOM.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
|
|
@ -74,14 +82,6 @@
|
||||||
#include "nsIModule.h"
|
#include "nsIModule.h"
|
||||||
#include "nsAutoLock.h"
|
#include "nsAutoLock.h"
|
||||||
#include "nsXPTCUtils.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 "xptinfo.h"
|
||||||
#include "xpcforwards.h"
|
#include "xpcforwards.h"
|
||||||
#include "xpclog.h"
|
#include "xpclog.h"
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "jsapi.h"
|
||||||
|
#include "jscntxt.h"
|
||||||
|
|
||||||
#include "nsComponentManagerUtils.h"
|
#include "nsComponentManagerUtils.h"
|
||||||
#include "nsServiceManagerUtils.h"
|
#include "nsServiceManagerUtils.h"
|
||||||
#include "nsIXPConnect.h"
|
#include "nsIXPConnect.h"
|
||||||
|
|
@ -60,9 +63,6 @@
|
||||||
#include "nsStringAPI.h"
|
#include "nsStringAPI.h"
|
||||||
#include "nsEmbedString.h"
|
#include "nsEmbedString.h"
|
||||||
|
|
||||||
#include "jsapi.h"
|
|
||||||
#include "jscntxt.h"
|
|
||||||
|
|
||||||
#include "xpctest.h"
|
#include "xpctest.h"
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,9 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
// FIXME(bug 332648): Give me a real API please!
|
||||||
|
#include "jscntxt.h"
|
||||||
|
|
||||||
#include "nsJSNPRuntime.h"
|
#include "nsJSNPRuntime.h"
|
||||||
#include "nsNPAPIPlugin.h"
|
#include "nsNPAPIPlugin.h"
|
||||||
#include "nsNPAPIPluginInstance.h"
|
#include "nsNPAPIPluginInstance.h"
|
||||||
|
|
@ -50,9 +53,6 @@
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
|
|
||||||
// FIXME(bug 332648): Give me a real API please!
|
|
||||||
#include "jscntxt.h"
|
|
||||||
|
|
||||||
using namespace mozilla::plugins::parent;
|
using namespace mozilla::plugins::parent;
|
||||||
|
|
||||||
// Hash of JSObject wrappers that wraps JSObjects as NPObjects. There
|
// Hash of JSObject wrappers that wraps JSObjects as NPObjects. There
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#include "prenv.h"
|
#include "prenv.h"
|
||||||
#include "prclist.h"
|
#include "prclist.h"
|
||||||
|
|
||||||
|
#include "jscntxt.h"
|
||||||
|
|
||||||
#include "nsAutoLock.h"
|
#include "nsAutoLock.h"
|
||||||
#include "nsNPAPIPlugin.h"
|
#include "nsNPAPIPlugin.h"
|
||||||
#include "nsNPAPIPluginInstance.h"
|
#include "nsNPAPIPluginInstance.h"
|
||||||
|
|
@ -70,8 +73,6 @@
|
||||||
#include "nsDOMJSUtils.h"
|
#include "nsDOMJSUtils.h"
|
||||||
#include "nsIPrincipal.h"
|
#include "nsIPrincipal.h"
|
||||||
|
|
||||||
#include "jscntxt.h"
|
|
||||||
|
|
||||||
#include "nsIXPConnect.h"
|
#include "nsIXPConnect.h"
|
||||||
|
|
||||||
#include "nsIObserverService.h"
|
#include "nsIObserverService.h"
|
||||||
|
|
|
||||||
|
|
@ -342,10 +342,6 @@ nsGTKRemoteService::HandleCommand(char* aCommand, nsIDOMWindow* aWindow,
|
||||||
command.Trim(" ", PR_TRUE, PR_TRUE);
|
command.Trim(" ", PR_TRUE, PR_TRUE);
|
||||||
ToLowerCase(command);
|
ToLowerCase(command);
|
||||||
|
|
||||||
#ifdef DEBUG_bsmedberg
|
|
||||||
printf("Processing xremote command: %s\n", command.get());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!command.EqualsLiteral("ping")) {
|
if (!command.EqualsLiteral("ping")) {
|
||||||
nsCAutoString desktopStartupID;
|
nsCAutoString desktopStartupID;
|
||||||
nsDependentCString cmd(aCommand);
|
nsDependentCString cmd(aCommand);
|
||||||
|
|
@ -393,13 +389,6 @@ nsGTKRemoteService::HandleCommandLine(char* aBuffer, nsIDOMWindow* aWindow,
|
||||||
PRInt32 argc = TO_LITTLE_ENDIAN32(*reinterpret_cast<PRInt32*>(aBuffer));
|
PRInt32 argc = TO_LITTLE_ENDIAN32(*reinterpret_cast<PRInt32*>(aBuffer));
|
||||||
char *wd = aBuffer + ((argc + 1) * sizeof(PRInt32));
|
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;
|
nsCOMPtr<nsILocalFile> lf;
|
||||||
rv = NS_NewNativeLocalFile(nsDependentCString(wd), PR_TRUE,
|
rv = NS_NewNativeLocalFile(nsDependentCString(wd), PR_TRUE,
|
||||||
getter_AddRefs(lf));
|
getter_AddRefs(lf));
|
||||||
|
|
@ -422,9 +411,6 @@ nsGTKRemoteService::HandleCommandLine(char* aBuffer, nsIDOMWindow* aWindow,
|
||||||
cmd, ' ',
|
cmd, ' ',
|
||||||
&desktopStartupID);
|
&desktopStartupID);
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_bsmedberg
|
|
||||||
printf(" argv[%i]:\t%s\n", i, argv[i]);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = cmdline->Init(argc, argv, lf, nsICommandLine::STATE_REMOTE_AUTO);
|
rv = cmdline->Init(argc, argv, lf, nsICommandLine::STATE_REMOTE_AUTO);
|
||||||
|
|
@ -525,10 +511,6 @@ nsGTKRemoteService::HandlePropertyChange(GtkWidget *aWidget,
|
||||||
(we only care
|
(we only care
|
||||||
about the first ) */
|
about the first ) */
|
||||||
|
|
||||||
#ifdef DEBUG_bsmedberg
|
|
||||||
printf("Handling command: %s\n", data);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Failed to get property off the window?
|
// Failed to get property off the window?
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
|
#include "jscntxt.h"
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsXPITriggerInfo.h"
|
#include "nsXPITriggerInfo.h"
|
||||||
|
|
@ -50,7 +51,6 @@
|
||||||
#include "nsIScriptSecurityManager.h"
|
#include "nsIScriptSecurityManager.h"
|
||||||
#include "nsICryptoHash.h"
|
#include "nsICryptoHash.h"
|
||||||
#include "nsIX509Cert.h"
|
#include "nsIX509Cert.h"
|
||||||
#include "jscntxt.h"
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// nsXPITriggerItem
|
// nsXPITriggerItem
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue