Closed
Bug 1440199
Opened 7 years ago
Closed 7 years ago
Remove unused functionality from Chromium IPC shared memory, including named shared memory
Categories
(Core :: IPC, enhancement, P1)
Tracking
()
RESOLVED
FIXED
mozilla61
People
(Reporter: jld, Assigned: jld)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
There are a few things in base::SharedMemory that aren't currently being used — locks, named segments, and POSIX-only IDs (really inode numbers). We could remove a few hundred lines of code, and I have patches which do this and pass Try.
This would also make it easier to make improvements to what remains of shared memory, like the sandbox integration proposed in bug 1439057, or maybe using shm_open() on POSIX platforms instead of direct filesystem access.
(It might also help with possibly simplifying the class hierarchy — there are (at least?) four different classes representing various aspects of “a shared memory segment”, and I don't think the code really needs to be that difficult to follow.)
Updated•7 years ago
|
Priority: -- → P3
Assignee | ||
Updated•7 years ago
|
Priority: P3 → P1
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
I wasn't sure who else among the IPC peers would be a good reviewer for shmem; redirect if needed.
Comment 5•7 years ago
|
||
mozreview-review |
Comment on attachment 8960849 [details]
Bug 1440199 - Part 1: Remove Chromium shared memory locks.
https://reviewboard.mozilla.org/r/229606/#review235518
I would think we do want some version of this at some point, right? With potentially placing things in shared memory for multiple content processes, we theoretically need some sort of cross-thread/process lock? But maybe this facility is not yet good enough and we should design something better.
Regardless, unused code is deleted code. r+!
Attachment #8960849 -
Flags: review?(nfroyd) → review+
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8960850 [details]
Bug 1440199 - Part 2: Remove named mode from IPC shared memory.
https://reviewboard.mozilla.org/r/229608/#review235524
r=me assuming my understanding below is correct.
::: ipc/chromium/src/base/shared_memory.h
(Diff revision 1)
> - // If read_only is true, opens the memory as read-only.
> - // If open_existing is true, and the shared memory already exists,
> - // opens the existing shared memory and ignores the size parameter.
> - // If name is the empty string, use a unique name.
Why are we also removing `read_only` and `open_existing` too? I can totally understand removing `name`, but the booleans seem like they would be helpful things to have? Oh, I suppose they don't make sense for anonymous shared memory segments, so much; read-onlyness is pointless, and opening an existing one doesn't make much sense because you don't have names. Correct?
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8960850 [details]
Bug 1440199 - Part 2: Remove named mode from IPC shared memory.
https://reviewboard.mozilla.org/r/229608/#review235526
Sigh, let's set the r+ flag.
Attachment #8960850 -
Flags: review?(nfroyd) → review+
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8960851 [details]
Bug 1440199 - Part 3: Remove IPC shared memory IDs.
https://reviewboard.mozilla.org/r/229610/#review235530
Attachment #8960851 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 9•7 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #6)
> Why are we also removing `read_only` and `open_existing` too? I can totally
> understand removing `name`, but the booleans seem like they would be helpful
> things to have? Oh, I suppose they don't make sense for anonymous shared
> memory segments, so much; read-onlyness is pointless, and opening an
> existing one doesn't make much sense because you don't have names. Correct?
Exactly. But I'll add that to the commit message.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 13•7 years ago
|
||
Pushed by jedavis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/17c89b6a5972
Part 1: Remove Chromium shared memory locks. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/9561bdb8c479
Part 2: Remove named mode from IPC shared memory. r=froydnj
https://hg.mozilla.org/integration/autoland/rev/5b55e19c6ce1
Part 3: Remove IPC shared memory IDs. r=froydnj
Comment 14•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/17c89b6a5972
https://hg.mozilla.org/mozilla-central/rev/9561bdb8c479
https://hg.mozilla.org/mozilla-central/rev/5b55e19c6ce1
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•