Closed Bug 827825 Opened 11 years ago Closed 11 years ago

IPDL single-process Shmem not working on windows

Categories

(Core :: IPC, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

Attachments

(1 file)

Allocating shmem on windows in a multi-thread single-process IPDL setup is not working. It's failing because mOtherProcess is NULL on the parent. This can trivially be reproduced by running ipdlunittest thread:TestShmem.
When calling ShareTo for a shmem we use OtherProcess() to indicate which process to share memory to. For Windows this actually matters since the security model requires explicitly specifying which process gets access to your memory (the parameter is ignored for posix). The Chromium ShareTo code has a special case for otherProcess == thisProcess(), but not for !otherProcess. The best solution here is probably to make mOtherProcess have a sane value (although this could make the name -slightly- confusing for single-process cases.)
Assignee: nobody → bas
Status: NEW → ASSIGNED
Attachment #699266 - Flags: review?(jones.chris.g)
Comment on attachment 699266 [details] [diff] [review]
Make mOtherProcess the current process for single-process IPDL protocols

I don't see any code that's relying on null mOtherProcess to mean "is cross-thread", and if it exists and doesn't have a test then ah well.
Attachment #699266 - Flags: review?(jones.chris.g) → review+
https://hg.mozilla.org/mozilla-central/rev/7dc925609a39
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: