From 5fa77fef77f05a1719089c3d0979907885fc057f Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Mon, 14 Jun 1999 20:20:33 +0000 Subject: [PATCH] Adding IsQueueOnCurrentThread(). git-svn-id: svn://10.0.0.236/trunk@35163 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/threads/nsEventQueue.cpp | 7 +++++++ mozilla/xpcom/threads/nsEventQueue.h | 2 ++ mozilla/xpcom/threads/nsIEventQueue.h | 2 ++ 3 files changed, 11 insertions(+) diff --git a/mozilla/xpcom/threads/nsEventQueue.cpp b/mozilla/xpcom/threads/nsEventQueue.cpp index 6dac31b8f5a..b1ef3715e6e 100644 --- a/mozilla/xpcom/threads/nsEventQueue.cpp +++ b/mozilla/xpcom/threads/nsEventQueue.cpp @@ -104,6 +104,13 @@ nsEventQueueImpl::GetPLEventQueue(PLEventQueue** aEventQueue) return NS_OK; } +NS_IMETHODIMP +nsEventQueueImpl::IsQueueOnCurrentThread(PRBool *aResult) +{ + *aResult = PL_IsQueueOnCurrentThread( mEventQueue ); + return NS_OK; +} + NS_IMETHODIMP nsEventQueueImpl::ProcessPendingEvents() diff --git a/mozilla/xpcom/threads/nsEventQueue.h b/mozilla/xpcom/threads/nsEventQueue.h index 3260b5b02a9..0e798682c81 100644 --- a/mozilla/xpcom/threads/nsEventQueue.h +++ b/mozilla/xpcom/threads/nsEventQueue.h @@ -53,6 +53,8 @@ public: NS_IMETHOD RevokeEvents(void* owner); NS_IMETHOD GetPLEventQueue(PLEventQueue** aEventQueue); + + NS_IMETHOD IsQueueOnCurrentThread(PRBool *aResult); // Helpers static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr); diff --git a/mozilla/xpcom/threads/nsIEventQueue.h b/mozilla/xpcom/threads/nsIEventQueue.h index ea080d282e5..256634d84fb 100644 --- a/mozilla/xpcom/threads/nsIEventQueue.h +++ b/mozilla/xpcom/threads/nsIEventQueue.h @@ -60,6 +60,8 @@ public: NS_IMETHOD RevokeEvents(void* owner) = 0; NS_IMETHOD GetPLEventQueue(PLEventQueue** aEventQueue) = 0; + + NS_IMETHOD IsQueueOnCurrentThread(PRBool *aResult) = 0; }; #endif /* nsIEventQueue_h___ */