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

RESOLVED FIXED

Status

()

Core
Networking
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: James Cook, Assigned: romaxa)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 3 obsolete attachments)

(Reporter)

Description

8 years ago
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.
(Reporter)

Updated

8 years ago
Depends on: 530075
(Reporter)

Comment 1

8 years ago
Created attachment 445927 [details] [diff] [review]
A possible answer

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 3

8 years ago
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-
(Assignee)

Comment 4

8 years ago
Created attachment 460139 [details]
nsMaemoNetworkManager::Startup backtrace child process

> 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)

Comment 5

8 years ago
Created attachment 460294 [details] [diff] [review]
Disable network manager on content side
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #460294 - Flags: review?(doug.turner)

Comment 6

8 years ago
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-

Comment 7

8 years ago
the other thing you should consider is making all network manager stuff only happen in the parent in IPC builds - not just maemo.
(Assignee)

Comment 8

8 years ago
Created attachment 460302 [details] [diff] [review]
Is that better?

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)
(Assignee)

Comment 9

8 years ago
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 ..
(Assignee)

Comment 10

8 years ago
(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?

Updated

8 years ago
Attachment #460302 - Flags: review?(doug.turner) → review-
(Assignee)

Comment 12

8 years ago
Created attachment 460434 [details] [diff] [review]
Create mNetworkLinkService only in default process
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
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.