One more self-update. I managed to debug into the Mozilla 1.4 source
code, and find that it failed in below two places:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpcom/components/nsComponentManager.cpp&rev=1.234
(for 1.4 release)
// failure in line#2006:
2004 dp 1.153 {
2005 dougt 1.231
2006 timeless 1.213 rv =
factory->CreateInstance(aDelegate, aIID, aResult); //// failed
sometimes.
2007 dp 1.153 NS_RELEASE(factory);
// failure in below lines:
2447 timeless 1.213
2448 neeti 1.176 entry->mServiceObject = service;
2449 *result = service.get();
2450 timeless 1.213 NS_ADDREF(NS_STATIC_CAST(nsISupports*,
*result));
2451 dougt 1.158 return rv; //// rv turns to 80004005, even
though line#2006 succeeds sometimes.
2452 }
After above pieces of code, it went into a piece of asemble code, so I
don't know the exact error info. I was quite confused. I went through
the change log to this file, but didn't find which fix might fix it, as
it doesn't happen with 1.6 .exe package:
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/xpcom/components/nsComponentManager.cpp&rev=1.234
Help are welcome !
-George.
Could anybody give any hints? I made a Mozilla 1.4 debug build and
tried to debug it, but it always failed in some other places. I still
didn't get the right cause. :-( Any
inputs ?
Thanks,
-George.
Hi all,
I'm adding below code to mfcembed.exe for profile management. Which
works with Mozilla 1.4 through 1.8a4 .zip packages, and 1.6 through
1.8a4 .exe package (mfcembed was copied to the GRE directory). But it
failed with 1.4.x .exe package in below line:
> return svcMgr->GetServiceByContractID(aContractID, aIID,
aResult);
with error code: 80004005. From nsError.h ...
> /* Returned when a function fails */
> 182 #define NS_ERROR_FAILURE ((nsresult)
0x80004005L)
nsresult InitializeProfile()
{......
nsCOMPtr<nsIPrefService> pref;
rv = GetService("@mozilla.org/preferences-service;1",
NS_GET_IID(nsIPrefService),
getter_AddRefs(pref));
}
nsresult
GetService(const char *aContractID, const nsIID &aIID, void
**aResult)
{
nsCOMPtr<nsIServiceManager> svcMgr;
nsresult rv = NS_GetServiceManager(getter_AddRefs(svcMgr));
if (NS_FAILED(rv)) return rv;
// Faiilure in below line
with error code: 80004005
return svcMgr->GetServiceByContractID(aContractID, aIID, aResult);
}
Other calls succeed like:
> rv = GetService("@mozilla.org/network/protocol;1?name=http",
NS_GET_IID(nsIHttpProtocolHandler),
getter_AddRefs(httpHandler));
Why ONLY below call
> rv = GetService("@mozilla.org/preferences-service;1",
NS_GET_IID(nsIPrefService),
getter_AddRefs(pref));
failed and only with 1.4 .exe package installation ? I find this line
"@mozilla.org/preferences-service;1,{1cd91b88-1dd2-11b2-92e1-ed22ed298000}"
in compreg.dat of Mozilla 1.4 .exe GRE directory.
I'm quite confused. Comments are much appreciated !
-George.
https://jdic.dev.java.net
|