summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/xulrunner/nsThreadUtils.patch
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-01-05 03:41:49 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-01-05 03:41:49 (GMT)
commitaaaed3a6a08206d2d16665695a622a48da869eaf (patch)
treeff54106ef2ad3b9f9a3220ed0e4251d76627b904 /abs/extra-testing/xulrunner/nsThreadUtils.patch
parent7f42f55d022dc8ca818a76dccfc66fce7c8dea4f (diff)
downloadlinhes_pkgbuild-aaaed3a6a08206d2d16665695a622a48da869eaf.zip
linhes_pkgbuild-aaaed3a6a08206d2d16665695a622a48da869eaf.tar.gz
linhes_pkgbuild-aaaed3a6a08206d2d16665695a622a48da869eaf.tar.bz2
Additional packages needed for Miro. Latest LIRC PKGBUILD from Arch.
Diffstat (limited to 'abs/extra-testing/xulrunner/nsThreadUtils.patch')
-rw-r--r--abs/extra-testing/xulrunner/nsThreadUtils.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/abs/extra-testing/xulrunner/nsThreadUtils.patch b/abs/extra-testing/xulrunner/nsThreadUtils.patch
new file mode 100644
index 0000000..69609c0
--- /dev/null
+++ b/abs/extra-testing/xulrunner/nsThreadUtils.patch
@@ -0,0 +1,42 @@
+--- xulrunner-1.9.0.4.orig/xpcom/glue/nsThreadUtils.cpp
++++ xulrunner-1.9.0.4/xpcom/glue/nsThreadUtils.cpp
+@@ -187,24 +187,27 @@
+ }
+ #endif // XPCOM_GLUE_AVOID_NSPR
+
++inline PRBool
++hasPendingEvents(nsIThread *thread)
++{
++ PRBool val;
++ return NS_SUCCEEDED(thread->HasPendingEvents(&val)) && val;
++}
++
+ PRBool
+ NS_HasPendingEvents(nsIThread *thread)
+ {
+-#ifdef MOZILLA_INTERNAL_API
+ if (!thread) {
++#ifndef MOZILLA_INTERNAL_API
++ nsCOMPtr<nsIThread> current;
++ NS_GetCurrentThread(getter_AddRefs(current));
++ return hasPendingEvents(current);
++#else
+ thread = NS_GetCurrentThread();
+ NS_ENSURE_TRUE(thread, PR_FALSE);
+- }
+-#else
+- nsCOMPtr<nsIThread> current;
+- if (!thread) {
+- NS_GetCurrentThread(getter_AddRefs(current));
+- NS_ENSURE_TRUE(current, PR_FALSE);
+- thread = current.get();
+- }
+ #endif
+- PRBool val;
+- return NS_SUCCEEDED(thread->HasPendingEvents(&val)) && val;
++ }
++ return hasPendingEvents(thread);
+ }
+
+ PRBool
+