From 1f6061e09849612e1c38ac09f2a4dcc627d28866 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Thu, 18 Feb 1999 00:47:09 +0000 Subject: [PATCH] initializing base app core no longer happens in the mail app core....this removes our build dependencies on the base app cores. --- mailnews/ui/messenger/src/nsJSMsgAppCore.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mailnews/ui/messenger/src/nsJSMsgAppCore.cpp b/mailnews/ui/messenger/src/nsJSMsgAppCore.cpp index c5b473873b15..ecefb9386e4d 100644 --- a/mailnews/ui/messenger/src/nsJSMsgAppCore.cpp +++ b/mailnews/ui/messenger/src/nsJSMsgAppCore.cpp @@ -366,12 +366,12 @@ MsgAppCore(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) // // MsgAppCore class initialization // -nsresult NS_InitMsgAppCoreClass(nsIScriptContext *aContext, void **aPrototype) +nsresult NS_InitMsgAppCoreClass(nsIScriptContext *aContext, void **aPrototype, JSObject * aParentProto) { JSContext *jscontext = (JSContext *)aContext->GetNativeContext(); JSObject *proto = nsnull; JSObject *constructor = nsnull; - JSObject *parent_proto = nsnull; + JSObject *parent_proto = aParentProto; JSObject *global = JS_GetGlobalObject(jscontext); jsval vp; @@ -380,10 +380,12 @@ nsresult NS_InitMsgAppCoreClass(nsIScriptContext *aContext, void **aPrototype) ((constructor = JSVAL_TO_OBJECT(vp)) == nsnull) || (PR_TRUE != JS_LookupProperty(jscontext, JSVAL_TO_OBJECT(vp), "prototype", &vp)) || !JSVAL_IS_OBJECT(vp)) { - +#if 0 if (NS_OK != NS_InitBaseAppCoreClass(aContext, (void **)&parent_proto)) { return NS_ERROR_FAILURE; } +#endif + proto = JS_InitClass(jscontext, // context global, // global object parent_proto, // parent proto @@ -440,7 +442,7 @@ extern "C" NS_DOM nsresult NS_NewScriptMsgAppCore(nsIScriptContext *aContext, ns return NS_ERROR_FAILURE; } - if (NS_OK != NS_InitMsgAppCoreClass(aContext, (void **)&proto)) { + if (NS_OK != NS_InitMsgAppCoreClass(aContext, (void **)&proto, parent)) { return NS_ERROR_FAILURE; }