From 8b618b2412633f26c52ccd6076584151f06e3fa5 Mon Sep 17 00:00:00 2001 From: "brendan@mozilla.org" Date: Tue, 4 Mar 2008 15:58:10 -0800 Subject: [PATCH] Fix over-including dependencies, and relocate ID_TO_VALUE to avoid over-including (r=mrbkap, bustage fix). --- js/src/jsprvtd.h | 2 ++ js/src/jsscope.h | 2 -- js/src/xpconnect/src/XPCNativeWrapper.cpp | 3 ++- js/src/xpconnect/src/XPCWrapper.cpp | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/js/src/jsprvtd.h b/js/src/jsprvtd.h index 4475cf2717d..ab988e83709 100644 --- a/js/src/jsprvtd.h +++ b/js/src/jsprvtd.h @@ -74,6 +74,8 @@ #define OBJECT_TO_JSID(obj) ((jsid)OBJECT_TO_JSVAL(obj)) #define OBJECT_JSVAL_TO_JSID(v) ((jsid)v) +#define ID_TO_VALUE(id) ((jsval)(id)) + /* * Convenience constants. */ diff --git a/js/src/jsscope.h b/js/src/jsscope.h index 944cdf159ec..748e269a708 100644 --- a/js/src/jsscope.h +++ b/js/src/jsscope.h @@ -365,8 +365,6 @@ js_NewScope(JSContext *cx, jsrefcount nrefs, JSObjectOps *ops, JSClass *clasp, extern void js_DestroyScope(JSContext *cx, JSScope *scope); -#define ID_TO_VALUE(id) ((jsval)(id)) - extern JS_FRIEND_API(JSScopeProperty **) js_SearchScope(JSScope *scope, jsid id, JSBool adding); diff --git a/js/src/xpconnect/src/XPCNativeWrapper.cpp b/js/src/xpconnect/src/XPCNativeWrapper.cpp index 72f19cb2976..e3b1fb6a456 100644 --- a/js/src/xpconnect/src/XPCNativeWrapper.cpp +++ b/js/src/xpconnect/src/XPCNativeWrapper.cpp @@ -40,8 +40,9 @@ #include "xpcprivate.h" #include "XPCNativeWrapper.h" -#include "jsdbgapi.h" #include "XPCWrapper.h" +#include "jsdbgapi.h" +#include "jsscope.h" JS_STATIC_DLL_CALLBACK(JSBool) XPC_NW_AddProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp); diff --git a/js/src/xpconnect/src/XPCWrapper.cpp b/js/src/xpconnect/src/XPCWrapper.cpp index 2c85148cd5e..d41ea6bf825 100644 --- a/js/src/xpconnect/src/XPCWrapper.cpp +++ b/js/src/xpconnect/src/XPCWrapper.cpp @@ -41,6 +41,7 @@ * ***** END LICENSE BLOCK ***** */ #include "XPCWrapper.h" +#include "jsscope.h" const PRUint32 XPCWrapper::sWrappedObjSlot = 1;