зеркало из https://github.com/mozilla/gecko-dev.git
initializing base app core no longer happens in the mail app core....this removes our build dependencies on the base app cores.
This commit is contained in:
Родитель
bf7774d2cd
Коммит
1f6061e098
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче