Closed Bug 42107 Opened 25 years ago Closed 25 years ago

need to fix string bundle init workaround

Categories

(Core Graveyard :: Embedding: APIs, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jud, Assigned: warrensomebody)

References

(Depends on 1 open bug)

Details

(Keywords: embed)

currently, in an embedding situation the embeddor must init a string bundle prior to using embedding routines in order to avoid thread safety assertions. We need to remove this requirement.
over to ruslan. Ruslan, this is your string init proxy stuff from socket thread.
Assignee: valeski → ruslan
Status: NEW → ASSIGNED
Done
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
waterson re-intro'd this last night by pulling the late init. we need to fix this asap as it kills many embedding folks. waterson's removal of the lateinit http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&fi le=nsSocketTransportService.cpp&root=/cvsroot&subdir=mozilla/netwerk/base/src&co mmand=DIFF_FRAMESET&rev1=1.41&rev2=1.42
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Use a proxied call! The LateInit() solution was broken and re-entered the service manager in an invalid way.
Keywords: embed
Whiteboard: nsbeta2+
Proxied call is not going to work, as a socket transport thread is using an event queue in a different way.
So we all talked about this a bit tonight; just thought I'd write down what was said for posterity's sake. A couple of ideas on how to fix: 1. Get rid of string bundle usage in Necko altogether; implement some kind of message interface that places the burden of error code-to-message resolution on the caller. 2. Make the service manager support a "late init" or "post create" callback that will allow a service to do any work after it's been officially be stuffed into the hashtable. (Cons: leaves service in an undefined state between creation and "post-create" running; doesn't solve the problem in a general way, e.g., may still need post-post-create and post-post-post-create ad infinitum.)
Whiteboard: nsbeta2+ → [nsbeta2+]
I vote for both solutions :-)
We talked some more, and I think (a) string bundles should be thread-safe, and (b) necko probably shouldn't use them. To make string bundles be thread-safe, the chrome registry will have to be thread safe.
Depends on: 44808
Should we make a dependent bug nsbeta+ or remove this from nsbeta2 per Gagan's request.
Keywords: nsbeta2
Whiteboard: [nsbeta2+]
this is serious. embeddors have to init the string bundle service on their thread at init time to get around this.
Whiteboard: [nsbeta2-]
I'm working on this (by removing string bundles from necko altogether -- see bug 40729). Reassigning to myself.
Assignee: ruslan → warren
Status: REOPENED → NEW
Turns out this bug is blocking Mitch's bug 40159 which is nsbeta2+.
Blocks: 40159
Whiteboard: [nsbeta2-]
Fixes checked in to make necko not depend on string bundles directly.
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
Updating QA Contact
QA Contact: jrgm → mdunn
Correction: Changing QA contact for the Embed API bugs to David Epstein.
QA Contact: mdunn → depstein
string bundle init no longer required for embedding.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.