Last Comment Bug 317052 - lib/base/whatnspr.c is obsolete
: lib/base/whatnspr.c is obsolete
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.9
: All All
-- normal (vote)
: 3.12
Assigned To: Wan-Teh Chang
: Jason Reid
Depends on:
Blocks: 282994
  Show dependency treegraph
Reported: 2005-11-18 15:22 PST by Wan-Teh Chang
Modified: 2006-04-24 10:07 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Simple patch: just remove the PR_dtoa call (3.53 KB, patch)
2005-11-18 15:25 PST, Wan-Teh Chang
rrelyea: review-
Details | Diff | Splinter Review
Full patch: CVS remove whatnspr.c (7.42 KB, patch)
2005-11-18 15:34 PST, Wan-Teh Chang
rrelyea: review+
Details | Diff | Splinter Review

Description User image Wan-Teh Chang 2005-11-18 15:22:02 PST
lib/base/whatnspr.c calls PR_dtoa and attempts
to use its return value to determine whether we
are running with the old NSPR 1 or the current
NSPR.  It needs this knowledge to handle the
differences in NSPR 1 and current NSPR's thread
private data functions.

Since we don't use NSPR 1 any more, most of the
code in lib/base/whatnspr.c is obsolete.  We can
even CVS remove that file.

One reason I'm filing this bug is that the PR_dtoa
(which is third-party code) crashes on ARM (bug 282994).
Since the PR_dtoa call in lib/base/whatnspr.c isn't
necessary, this is one more reason to remove it.
Comment 1 User image Wan-Teh Chang 2005-11-18 15:25:08 PST
Created attachment 203582 [details] [diff] [review]
Simple patch: just remove the PR_dtoa call

This simple patch has a downside: the file name whatnspr.c
would be confusing because it would not describe the
little remaining code.
Comment 2 User image Wan-Teh Chang 2005-11-18 15:34:51 PST
Created attachment 203586 [details] [diff] [review]
Full patch: CVS remove whatnspr.c

Bob, please indicate which patch you like better
and mark the other one review-.

It is fine to remove #include "prthread.h" from base.h
because base.h already indirectly includes nspr.h,
which includes prthread.h.
Comment 3 User image Wan-Teh Chang 2005-11-18 15:37:56 PST
I forgot to note that I am in favor of CVS
removing lib/base/whatnspr.c.
Comment 4 User image Robert Relyea 2005-11-23 17:43:08 PST
Comment on attachment 203586 [details] [diff] [review]
Full patch: CVS remove whatnspr.c

The only question is do we care about loading ckfw modules into NSS 1.0 programs (like old Netscape Apps)?

I think that Communicator was nspr2 already, so it probably isn't an issue, but I would like to verify that (pre-Communicator could load pkcs #11 modules).

Comment 5 User image Wan-Teh Chang 2005-12-19 10:03:37 PST
In NSS 3.11, we've made the decision that lib/ckfw
requires the current NSPR shared libraries/DLLs
(bug 302416).

I checked in the full patch (cvs remove whatnspr.c)
on the NSS trunk (NSS 3.12).

Checking in base.h;
/cvsroot/mozilla/security/nss/lib/base/base.h,v  <--  base.h
new revision: 1.18; previous revision: 1.17
Checking in error.c;
/cvsroot/mozilla/security/nss/lib/base/error.c,v  <--  error.c
new revision: 1.7; previous revision: 1.6
Checking in;
/cvsroot/mozilla/security/nss/lib/base/,v  <--
new revision: 1.9; previous revision: 1.8
Removing whatnspr.c;
/cvsroot/mozilla/security/nss/lib/base/whatnspr.c,v  <--  whatnspr.c
new revision: delete; previous revision: 1.4
Comment 6 User image Nelson Bolyard (seldom reads bugmail) 2006-04-23 23:24:07 PDT
Wan-Teh: Is there any reason not to do this for NSS 3.11.1 ?
Comment 7 User image Wan-Teh Chang 2006-04-24 10:07:51 PDT
You can check in the full patch on the NSS_3_11_BRANCH.
(The reason I didn't check it in on the NSS_3_11_BRANCH
is that the bug isn't severe enough.)

Note You need to log in before you can comment on or make changes to this bug.