Closed Bug 1484774 Opened 6 years ago Closed 6 years ago

Create a reusable class to pass prefs to child processes

Categories

(Core :: IPC, enhancement)

60 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: valentin, Assigned: kershaw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 obsolete file)

The content parent has a specific way of passing prefs to new processes when they start up [1]. This involves shared memory, a bunch of ifdefs to handle different platforms. For the necko process work, it would be great to have a reusable way to pass these preferences (without duplicating code), maybe without creating multiple sharedmemory zones containing the same prefs. [1] https://searchfox.org/mozilla-central/rev/83562422ecb0f5683da7a9a26ce05ce62bc0c882/dom/ipc/ContentParent.cpp#2158-2217
Since both content process and socket process need parent to pass prefs via share memory, this patch introduces two classes for this purpose. 1. SerializePreferenceToSharedMemory This class should be only used in parent process and is used to serialize pref into share memory. 2. DeserializePreferenceFromSharedMemory Should be used in content process and socket process. Used to deserialize prefs from share memory.
Assignee: nobody → kershaw
Whiteboard: [necko-triaged]
Hi Kris, Could you take a look at this patch when you have time? Thanks.
Flags: needinfo?(kmaglione+bmo)
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(kmaglione+bmo)
Resolution: --- → FIXED
Attachment #9005981 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: