JSString* jsMsgStr = JS_NewUCStringCopyZ(jscontext, (jschar*) unicodeMsg.GetUnicode());
JSString* jsMsgStr = JS_NewUCStringCopyZ(jscontext, (jschar*) unicodeMsg.get());
nsHTTPIndexParser::OnFTPControlLog(PRBool server, const char *msg){    NS_ENSURE_TRUE(mContainer, NS_OK);    nsCOMPtr<nsIScriptGlobalObject> scriptGlobal(do_GetInterface(mContainer));    NS_ENSURE_TRUE(scriptGlobal, NS_OK);    nsCOMPtr<nsIScriptContext> context;    nsresult rv = scriptGlobal->GetContext(getter_AddRefs(context));    NS_ENSURE_TRUE(context, NS_OK);    JSContext* jscontext = NS_REINTERPRET_CAST(JSContext*,                                               context->GetNativeContext());    JSObject* global = JS_GetGlobalObject(jscontext);    if (!jscontext || !global) return NS_OK;        jsval params[2];    nsString unicodeMsg;    unicodeMsg.AssignWithConversion(msg);    JSString* jsMsgStr = JS_NewUCStringCopyZ(jscontext, (jschar*) unicodeMsg.GetUnicode());    params[0] = BOOLEAN_TO_JSVAL(server);    params[1] = STRING_TO_JSVAL(jsMsgStr);        jsval val;    JS_CallFunctionName(jscontext,                         global,                         "OnFTPControlLog",                        2,                         params,                         &val);    return NS_OK;}