nsStringBundle gives me the threadsafe assertion



19 years ago
14 years ago


(Reporter: sspitzer, Assigned: alecf)


Windows NT

Firefox Tracking Flags

(Not tracked)


(Whiteboard: fix in hand)

this will fix the problem:

? diff.txt
Index: nsStringBundle.cpp
RCS file: /cvsroot/mozilla/intl/strres/src/nsStringBundle.cpp,v
retrieving revision 1.60
diff -p -r1.60 nsStringBundle.cpp
*** nsStringBundle.cpp	2000/04/25 05:29:58	1.60
--- nsStringBundle.cpp	2000/04/25 15:10:54
*************** nsStringBundle::GetStringFromName(const 
*** 145,151 ****
    return ret;
! NS_IMPL_ISUPPORTS1(nsStringBundle, nsIStringBundle)
  /* void GetStringFromID (in long aID, out wstring aResult); */
--- 145,151 ----
    return ret;
! NS_IMPL_THREADSAFE_ISUPPORTS1(nsStringBundle, nsIStringBundle)
  /* void GetStringFromID (in long aID, out wstring aResult); */

Comment 1

19 years ago
yikes, that's odd.
Whiteboard: fix in hand

Comment 2

19 years ago
Hi, Alec:

Did you ask Warren to review the threadsafe portion of the constructor? He was not in favor of 
using the threadsfafe version of the MACRO to warrant the thread safety of the stringbunlde class.

Comment 3

19 years ago
I figured out what's going on here.
Basically I have extended the lifetime of a stringbundle now, because it's
cached. What happens is that thread 1 asks for a stringbundle, and thread 2
later asks for the same string bundle. Since the stringbundle was created on
thread 1, it asserts.
 This means I have to 
1) make sure the stringbundle itself is threadsafe (should be trivial)
2) fix the macro as seth suggested.

you'd probably only see the assertion if you run with the PSM.

I've noticed that when I use the PSM (for secure imap, http or news) I get tons
of these assertions, when I don't with out the PSM.

this is one of those assertions.

Comment 5

19 years ago
ah, good to know. thanks

Comment 6

19 years ago
Ok I've fixed both of these in my tree. if this ends up being a blocker I can
check in.

Comment 7

19 years ago
fixed this yesterday.
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 8

18 years ago
Sorry for the spam.  New QA Contact for Browser General.  Thanks for your help
Joseph (good luck with the new job) and welcome aboard Doron Rosenberg
QA Contact: jelwell → doronr

Comment 9

18 years ago
Alec Flett can you update the QA contact on this bug.  Thanks

Comment 10

18 years ago
to what? I don't know who the QA contact should be...tao?
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.