replace PR_CurrentThread with PR_GetCurrentThread

RESOLVED FIXED in 4.7

Status

defect
--
trivial
RESOLVED FIXED
17 years ago
14 years ago

People

(Reporter: timeless, Assigned: timwatt)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

()

Attachments

(2 attachments, 4 obsolete attachments)

http://lxr.mozilla.org/mozilla/source/nsprpub/pr/include/prthread.h#162

161 NSPR_API(PRThread*) PR_GetCurrentThread(void);
162 #define PR_CurrentThread() PR_GetCurrentThread() /* for nspr1.0 compat. */

mozilla isn't an nspr1 application, there are ~99 lxr hits for
PR_GetCurrentThread and ~40 for PR_CurrentThread, since we're an nspr4 consumer
i think we should convert our consumers to use the proper nspr4 function name.
This skips nsprpub/ and security/, as requested.
I just found that the PR_CurrentThread macro, which is
for compatibility with nspr1.0, is not in #ifndef
NO_NSPR_10_SUPPORT.  This patch fixes that.

Are you going to submit separate patches for security
and nspr?  (I found that even nspr itself is using
PR_CurrentThread.)
we wanted some form of confirmation before we provided patches for security and nspr. patching nspr of course requires a bit more effort since there is at least the one instance which should not be replaced. :-)
Assignee: timeless → riceman
This patch exclusively covers nspr and security.
Posted patch nspr+nss changes (obsolete) — Splinter Review
I accidentally let a change to CVS_ID in one of the files slip into my patch
Attachment #90960 - Attachment is obsolete: true
CCing affected module owners.

All non-obsoleted patches (attachment 90771 [details] [diff] [review], attachment 90880 [details] [diff] [review], and attachment
90965 [details] [diff] [review]) are candidates for review/application.
I have tested these patches and they apply with no errors to a 2002-07-11-10 trunk.
r=morse for the change to singsign.cpp
if we need to be using PR_GetCurrentThread, then r= on your patch for changes in
xpcom and netwerk.  
r=dveditz for libjar stuff if that's what you're looking for. Or sr=dveditz in
general if you need it.
Comment on attachment 90771 [details] [diff] [review]
Patch fixing most occurrences of PR_CurrentThread

committed
Attachment #90771 - Attachment is obsolete: true
Attachment #90771 - Flags: superreview+
Attachment #90771 - Flags: review+
Posted patch Supplemental netwerk fix (obsolete) — Splinter Review
followup to attachment 90771 [details] [diff] [review]: looks like a couple more instances snuck into
netwerk in the mean time.
Comment on attachment 159291 [details] [diff] [review]
Supplemental netwerk fix

r+sr=darin
Attachment #159291 - Flags: superreview+
Attachment #159291 - Flags: review+
Comment on attachment 159291 [details] [diff] [review]
Supplemental netwerk fix

mozilla/netwerk/protocol/http/src/nsHttpTransaction.cpp 	1.81
Attachment #159291 - Attachment is obsolete: true
Product: Core → Mozilla Application Suite
Comment on attachment 90965 [details] [diff] [review]
nspr+nss changes

wtc, would you please commit this?
Attachment #90965 - Attachment description: Removed accidental change → nspr+nss changes
Attachment #90965 - Flags: review?(wtchang)
Component: XP Apps → NSPR
Product: Mozilla Application Suite → NSPR
Version: Trunk → other
Comment on attachment 90965 [details] [diff] [review]
nspr+nss changes

The NSPR changes are good.  The NSS change is incorrect
because the code in question is actually using NSPR 1.0.
(That code should be removed.)
Attachment #90965 - Flags: review?(wtchang) → review-
Posted patch nspr changesSplinter Review
I've checked in the NSPR changes submitted by Tim (attachment 90965 [details] [diff] [review])
on the NSPR trunk (NSPR 4.7) and the NSPRPUB_PRE_4_2_CLIENT_BRANCH
(Mozilla 1.9a).
Attachment #90965 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [4.7]
Whiteboard: [4.7]
Target Milestone: --- → 4.7
You need to log in before you can comment on or make changes to this bug.