Closed Bug 221012 Opened 21 years ago Closed 21 years ago

nsGNOMERegistry must not call gnome_program_init when embedded

Categories

(Core Graveyard :: Embedding: GTK Widget, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chpe, Assigned: bryner)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
Build Identifier: 

When embedding mozilla in Epiphany, gnome_program_init is run twice; first from
Epiphany, and a second time from nsGNOMERegistry::Startup(), which sets the
application name to "Gecko".


Reproducible: Always

Steps to Reproduce:




From nsGNOMERegistry::Startup():

  // Initialize GNOME, if it's not already initialized.  It's not
  // necessary to tell GNOME about our actual command line arguments.

  char *argv[1] = { "gecko" };
  _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
                      1, argv, NULL);

Despite the comment, gnome_program_init is called unconditionally.
Bryner, this is yours too.
Assignee: blizzard → bryner
Severity: normal → critical
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is a pretty serious problem.  I'm not sure how to fix it. 
gnome_program_init() does all sorts of things.
Blocks: gtk2
Hm, my understanding from looking at how gnome_program_init works led me to
believe it wouldn't do that if the program was already initialized.

At any rate, we can fix this fairly easily.  Patch coming up.
Attached patch suggested fixSplinter Review
check whether gnome_program_get() returns null; only call gnome_program_init()
if it does
Attachment #133705 - Flags: review?(blizzard)
Attachment #133705 - Flags: review?(blizzard) → review+
checked in.
Status: NEW → 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

Created:
Updated:
Size: