landing patch for bug 326273 "Implement nsIThreadManager" (Mac portions by Mark Mentovai) with reviews from bienvenu, bsmedberg, bzbarsky, josh, roc, and ssieb

This commit is contained in:
darin@meer.net
2006-05-10 17:30:15 +00:00
parent a7c0118a7a
commit 0700b87ece
324 changed files with 8074 additions and 14794 deletions

View File

@@ -46,6 +46,7 @@
#include "nsIServiceManager.h"
#include "nsIProxyObjectManager.h"
#include "nsSupportsArray.h"
#include "nsThreadUtils.h"
#include "nsConsoleService.h"
#include "nsConsoleMessage.h"
@@ -309,24 +310,12 @@ nsresult
nsConsoleService::GetProxyForListener(nsIConsoleListener* aListener,
nsIConsoleListener** aProxy)
{
nsresult rv;
*aProxy = nsnull;
nsCOMPtr<nsIProxyObjectManager> proxyManager =
(do_GetService(NS_XPCOMPROXY_CONTRACTID));
if (proxyManager == nsnull)
return NS_ERROR_NOT_AVAILABLE;
/*
* NOTE this will fail if the calling thread doesn't have an eventQ.
*
* Would it be better to catch that case and leave the listener unproxied?
*/
rv = proxyManager->GetProxyForObject(NS_CURRENT_EVENTQ,
NS_GET_IID(nsIConsoleListener),
aListener,
PROXY_ASYNC | PROXY_ALWAYS,
(void**) aProxy);
return rv;
return NS_GetProxyForObject(NS_PROXY_TO_CURRENT_THREAD,
NS_GET_IID(nsIConsoleListener),
aListener,
NS_PROXY_ASYNC | NS_PROXY_ALWAYS,
(void**) aProxy);
}