rpms/firefox/F-7 firefox-1.5-thread-cleanup.patch, NONE, 1.1 firefox.spec, 1.183, 1.184

Christopher Aillon (caillon) fedora-extras-commits at redhat.com
Sun Jun 3 19:40:22 UTC 2007


Author: caillon

Update of /cvs/extras/rpms/firefox/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21515

Modified Files:
	firefox.spec 
Added Files:
	firefox-1.5-thread-cleanup.patch 
Log Message:
* Sun Jun  3 2007 Christopher Aillon <caillon at redhat.com> 2.0.0.4-2
- Properly clean up threads with newer NSPR


firefox-1.5-thread-cleanup.patch:

--- NEW FILE firefox-1.5-thread-cleanup.patch ---
Index: mozilla/xpcom/threads/nsThread.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/threads/nsThread.cpp,v
retrieving revision 1.58.4.2
diff -u -r1.58.4.2 nsThread.cpp
--- mozilla/xpcom/threads/nsThread.cpp	1 Oct 2005 18:43:00 -0000	1.58.4.2
+++ mozilla/xpcom/threads/nsThread.cpp	7 May 2007 19:10:58 -0000
@@ -470,9 +470,17 @@
 nsThread::Shutdown()
 {
     if (gMainThread) {
-        // XXX nspr doesn't seem to be calling the main thread's destructor
-        // callback, so let's help it out:
-        nsThread::Exit(NS_STATIC_CAST(nsThread*, gMainThread));
+        // In most recent versions of NSPR the main thread's destructor
+        // callback will get called.
+        // In older versions of NSPR it will not get called,
+        // (unless we call PR_Cleanup).
+        // Because of that we:
+        // - call the function ourselves
+        // - set the data pointer to NULL to ensure the function will
+        //   not get called again by NSPR
+        // The PR_SetThreadPrivate call does both of these.
+        // See also bugs 379550, 362768.
+        PR_SetThreadPrivate(kIThreadSelfIndex, NULL);
         nsrefcnt cnt;
         NS_RELEASE2(gMainThread, cnt);
         NS_WARN_IF_FALSE(cnt == 0, "Main thread being held past XPCOM shutdown.");


Index: firefox.spec
===================================================================
RCS file: /cvs/extras/rpms/firefox/F-7/firefox.spec,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- firefox.spec	31 May 2007 03:23:50 -0000	1.183
+++ firefox.spec	3 Jun 2007 19:39:47 -0000	1.184
@@ -12,7 +12,7 @@
 Summary:        Mozilla Firefox Web browser.
 Name:           firefox
 Version:        2.0.0.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 URL:            http://www.mozilla.org/projects/firefox/
 License:        MPL/LGPL
 Group:          Applications/Internet
@@ -62,6 +62,7 @@
 Patch84:        firefox-2.0-pango-printing.patch
 
 # Other
+Patch100:       firefox-1.5-thread-cleanup.patch
 Patch102:       firefox-1.5-theme-change.patch
 Patch104:       firefox-1.5-ppc64.patch
 
@@ -157,6 +158,7 @@
 %patch83 -p1 -b .pango-cursor-position
 %patch84 -p0 -b .pango-printing
 
+%patch100 -p1 -b .thread-cleanup
 %patch102 -p0 -b .theme-change
 %patch104 -p1 -b .ppc64
 
@@ -416,6 +418,9 @@
 #---------------------------------------------------------------------
 
 %changelog
+* Sun Jun  3 2007 Christopher Aillon <caillon at redhat.com> 2.0.0.4-2
+- Properly clean up threads with newer NSPR
+
 * Wed May 30 2007 Christopher Aillon <caillon at redhat.com> 2.0.0.4-1
 - Final version
 




More information about the fedora-extras-commits mailing list