Bug 609501 - Change nsIThreadManager for bug 580096. r=jst

This commit is contained in:
Ben Turner 2010-11-03 18:41:06 -07:00
parent e6d4f3de4a
commit d4457d3cde
2 changed files with 15 additions and 1 deletions

View File

@ -45,7 +45,7 @@ interface nsIThread;
/** /**
* An interface for creating and locating nsIThread instances. * An interface for creating and locating nsIThread instances.
*/ */
[scriptable, uuid(056216f5-8803-46b4-9199-d95bc1f0446f)] [scriptable, uuid(487c10bf-0a22-4148-89fa-790d819dd559)]
interface nsIThreadManager : nsISupports interface nsIThreadManager : nsISupports
{ {
/** /**
@ -89,4 +89,10 @@ interface nsIThreadManager : nsISupports
* application process. * application process.
*/ */
readonly attribute boolean isMainThread; readonly attribute boolean isMainThread;
/**
* This attribute is true if the calling thread is the thread on which the
* cycle collector runs.
*/
readonly attribute boolean isCycleCollectorThread;
}; };

View File

@ -305,3 +305,11 @@ nsThreadManager::GetIsMainThread(PRBool *result)
*result = (PR_GetCurrentThread() == mMainPRThread); *result = (PR_GetCurrentThread() == mMainPRThread);
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsThreadManager::GetIsCycleCollectorThread(PRBool *result)
{
// Not yet implemented.
*result = PR_FALSE;
return NS_OK;
}