Closed Bug 561716 Opened 14 years ago Closed 14 years ago

g_type_init not called by nsMaemoNetworkManager::Startup in the Qt build

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bringbackbsd, Assigned: romaxa)

References

Details

Attachments

(2 files, 3 obsolete files)

In a Qt build the nsMaemoNetworkManager::Startup function (from netwerk/system/maemo/nsMaemoNetworkManager.cpp) does not call g_type_init before calling dbus_connection_setup_with_g_main.  This causes a problem with xpcshell, not allowing for any networking events to be monitored.
Depends on: 530075
Attached patch A possible answer (obsolete) — Splinter Review
I'm not sure this is the right thing to do, but it does cure the problem.  I see that g_type_init is called within toolkit/xre/nsNativeAppSupportQt.cpp, should it be moved?
Attachment #445927 - Flags: review?(mark.finkle)
Comment on attachment 445927 [details] [diff] [review]
A possible answer

Passing to doug
Attachment #445927 - Flags: review?(mark.finkle) → review?(doug.turner)
Comment on attachment 445927 [details] [diff] [review]
A possible answer

i'd rather see this somewhere lower level, like in toolkit/

http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsNativeAppSupportQt.cpp#60
Attachment #445927 - Flags: review?(doug.turner) → review-
> i'd rather see this somewhere lower level, like in toolkit/
> 
> http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsNativeAppSupportQt.cpp#60

Problem is that we have this problem on child process, and NativeAppSupport - not started there, and nsMaemoNetworkManager::Startup called without g_type_init...

not sure but I guess nsMaemoNetworkManager::Startup should not start on content process side.
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #460294 - Flags: review?(doug.turner)
Comment on attachment 460294 [details] [diff] [review]
Disable network manager on content side

this is fine, but you got to give me a comment, man!  irc conversations don't count.
Attachment #460294 - Flags: review?(doug.turner) → review-
the other thing you should consider is making all network manager stuff only happen in the parent in IPC builds - not just maemo.
Attached patch Is that better? (obsolete) — Splinter Review
is it possible already describe in manifest file something like "load in parent only" and prevent even constructor call from comp manager manifest loader?
Attachment #460294 - Attachment is obsolete: true
Attachment #460302 - Flags: review?(doug.turner)
It would be nice to have such feature in component registration, and tell to component manager that this component should be only loaded in parent or child process ..
(In reply to comment #9)
> It would be nice to have such feature in component registration, and tell to
> component manager that this component should be only loaded in parent or child
> process ..

Benjamin any ideas?
Attachment #460302 - Flags: review?(doug.turner) → review-
Attachment #445927 - Attachment is obsolete: true
Attachment #460302 - Attachment is obsolete: true
Attachment #460434 - Flags: review?(doug.turner)
Comment on attachment 460434 [details] [diff] [review]
Create mNetworkLinkService only in default process

change:

// go into managed mode if we can, and chrome process

to

// go into managed mode if we can.  this should only happen in the parent process.
Attachment #460434 - Flags: review?(doug.turner) → review+
http://hg.mozilla.org/mozilla-central/rev/69c18f83cf5d

and

http://hg.mozilla.org/mozilla-central/rev/3ed8f0ce4099 (thanks khuey!)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: