Closed Bug 235188 Opened 21 years ago Closed 21 years ago

RFE: Mozilla should have an option to run X11 in threadsafe mode

Categories

(Core Graveyard :: GFX, defect)

Sun
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: roland.mainz, Assigned: roland.mainz)

Details

Attachments

(1 file, 2 obsolete files)

RFE: Mozilla should have an option to run X11 in threadsafe mode. We need such an option for various tests, incl. the new flash plugin (and to test whether it is possible to run plugins in seperate threads to decouple them from the main input thread). This is also a preparation to make this option the default in one or two years...
Status: NEW → ASSIGNED
Assignee: general → roland.mainz
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Attached patch Patch for 2004-02-21-trunk (obsolete) — Splinter Review
Comment on attachment 141942 [details] [diff] [review] Patch for 2004-02-21-trunk Requesting r=(sr= and checkin... The patch does not change any default unless either the commandline option or the env var is set.
Attachment #141942 - Flags: superreview?(roc)
Attachment #141942 - Flags: review?(roc)
Comment on attachment 141942 [details] [diff] [review] Patch for 2004-02-21-trunk Blizzard should look at this. Please use #if defined(MOZ_X11) instead of that disjunction.
Attachment #141942 - Flags: superreview?(roc)
Attachment #141942 - Flags: superreview?(blizzard)
Attachment #141942 - Flags: review?(roc)
Attachment #141942 - Flags: review+
Attached patch New patch per roc's comments (obsolete) — Splinter Review
The version also fixes the problem that the env variable check only worked when there are any additional command line arguments (and checking the env var for each loop cycle wasn't a good idea either).
Attachment #141942 - Attachment is obsolete: true
Attachment #141942 - Flags: superreview?(blizzard)
Comment on attachment 142074 [details] [diff] [review] New patch per roc's comments Requestint sr= ... quick review would ne nice since we'd like to test mozilla running in threadsafe mode against Xfree86V4.4.0RC3 and fix any outstanding issues for that release.
Attachment #142074 - Flags: superreview?(blizzard)
+ if (PL_strcmp(PR_GetEnv("MOZILLA_X11_XINITTHREADS"), "1") == 0) { won't this crash if the variable is not defined?
Robert O'Callahan wrote: > + if (PL_strcmp(PR_GetEnv("MOZILLA_X11_XINITTHREADS"), "1") == 0) { > won't this crash if the variable is not defined? No, many of the PR_*-functions allow |nsnull|-pointers.
I *really* think Chris needs to sign off on this. Please hassle him on IRC or do whatever you have to do to get his attention.
Comment on attachment 142074 [details] [diff] [review] New patch per roc's comments >+ for( int i=1 ; i < argc ; i++ ) { Please pick a consistent style. This clashes with if (foo) later. Better yet, just use local style. >+ if (PL_strcmp(argv[i], "-xinitthreads") == 0) { >+ x11threadsafe = PR_TRUE; >+ break; >+ } >+ } Some vertical whitespace here, please. >+ if (PL_strcmp(PR_GetEnv("MOZILLA_X11_XINITTHREADS"), "1") == 0) { >+ x11threadsafe = PR_TRUE; >+ } This could just be shortened to: if (PR_GetEnv("MOZILLA_X11_XINITTHREADS")) {
Attachment #142074 - Flags: superreview?(blizzard) → superreview-
Attachment #142074 - Attachment is obsolete: true
Christopher Blizzard wrote: > (From update of attachment 142074 [details] [diff] [review]) > >+ for( int i=1 ; i < argc ; i++ ) { > > Please pick a consistent style. This clashes with if (foo) later. Better > yet, just use local style. Fixed. I've copied the |for()|-statement below 1:1 :) > >+ if (PL_strcmp(argv[i], "-xinitthreads") == 0) { > >+ x11threadsafe = PR_TRUE; > >+ break; > >+ } > >+ } > > Some vertical whitespace here, please. Fixed. > >+ if (PL_strcmp(PR_GetEnv("MOZILLA_X11_XINITTHREADS"), "1") == 0) { > > This could just be shortened to: > > if (PR_GetEnv("MOZILLA_X11_XINITTHREADS")) { Fixed.
Attachment #142952 - Flags: superreview?(blizzard)
Attachment #142952 - Flags: superreview?(blizzard) → superreview+
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: