Closed Bug 1303374 Opened 8 years ago Closed 8 years ago

When ContentChild calls Init, it sends a sync message ("GetProcessAttributes")

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: blassey, Assigned: blassey)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch avoid_get_process_attr.patch (obsolete) (deleted) — Splinter Review
This could slow down child process start up if the parent is busy, this patch sends these as part of the command line
Attachment #8792030 - Flags: review?(wmccloskey)
Comment on attachment 8792030 [details] [diff] [review] avoid_get_process_attr.patch Review of attachment 8792030 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/xre/nsEmbedFunctions.cpp @@ +608,1 @@ > for (int idx = aArgc; idx > 0; idx--) { Can you please move all this command line handling to ContentChild (forwarded through ContentProcess)? That seems like a better place to put it.
Attachment #8792030 - Flags: review?(wmccloskey)
Attached patch avoid_get_process_attr.patch (obsolete) (deleted) — Splinter Review
This keeps the commandline flag handling in nsEmbedFunctions but parses strings in ContentChild. Let me know what you think of this approach.
Attachment #8792030 - Attachment is obsolete: true
Attachment #8795062 - Flags: review?(wmccloskey)
Attached patch avoid_get_process_attr.patch (deleted) — Splinter Review
moves flag handling to ContentProcess
Assignee: nobody → blassey.bugs
Attachment #8795062 - Attachment is obsolete: true
Attachment #8795062 - Flags: review?(wmccloskey)
Attachment #8795074 - Flags: review?(wmccloskey)
Comment on attachment 8795074 [details] [diff] [review] avoid_get_process_attr.patch Review of attachment 8795074 [details] [diff] [review]: ----------------------------------------------------------------- We talked about some changes here. Basically, we'll send messages with the data we need asynchronously from the parent to the child. I think you have two alternatives: 1. You can pass an IPC message to send to RunPerformAsyncLaunch, and it would send it from the IO thread after InitializeChannel. You'll need to set the routing ID for the message to MSG_ROUTING_CONTROL and you'll need to set the message type to some actual message in PContent. 2. You can use AsyncLaunch instead of LaunchAndWaitForProcessHandle. That will wait for the channel but not for the process to start. Then you can Open the channel and use a normal IPDL send, which will handle the serialization for you. Then you'll need to sit there and wait until the process state is PROCESS_CREATED, just like LaunchAndWaitForProcessHandle. Maybe add a method to GeckoChildProcessHost for that since I don't see one. I prefer approach #2 since you don't have to do serialization yourself and it seems a little less invasive. ::: toolkit/xre/nsEmbedFunctions.cpp @@ +602,5 @@ > case GeckoProcessType_Plugin: > process = new PluginProcessChild(parentPID); > break; > > case GeckoProcessType_Content: { No need for the braces now.
Attachment #8795074 - Flags: review?(wmccloskey)
fixed by bug 1303096
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: