Closed
Bug 874592
Opened 12 years ago
Closed 12 years ago
nsFrameMessageManager::NewProcessMessageManager constructs child process managers with no parent
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: jimb, Assigned: smaug)
Details
Attachments
(1 file, 1 obsolete file)
|
1.19 KB,
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
An nsFrameMessageManager representing a child process (MM_CHROME | MM_PROCESSMANAGER) ought to have the process message manager (@mozilla.org/parentprocessmessagemanager;1) as its parent, but nsFrameMessageManager::NewProcessMessageManager sometimes constructs them with a null parent, so that messages from children don't propagate up to the parent.
To reproduce, add an assertion like this to nsFrameMessageManager::NewProcessMessageManager:
nsFrameMessageManager* mm;
if (aProcess) {
+ NS_ABORT_IF_FALSE(nsFrameMessageManager::sParentProcessManager,
+ "parent process manager not created");
mm = new nsFrameMessageManager(aProcess,
nsFrameMessageManager::sParentProcessManager,
and then run: ./mach xpcshell-test netwerk/test/unit_ipc
The problem is that nsFrameMessageManager::NewProcessMessageManager tries to ensure that sParentProcessManager has been created, but doesn't actually store a pointer it anywhere that holds a reference to it long enough to keep it alive when we create the message manager for the particular child. nsFrameMessageManager::~nsFrameMessageManager recognizes that it's destroying the root, and clears sParentProcessManager, leaving it null by the time NewProcessMessageManager calls 'new nsFrameMessageManager'.
| Assignee | ||
Comment 1•12 years ago
|
||
Make if (!nsFrameMessageManager::sParentProcessManager) { to create
parent process mm using GetInterface?
| Assignee | ||
Comment 2•12 years ago
|
||
Attachment #752350 -
Flags: feedback?(jimb)
| Assignee | ||
Comment 3•12 years ago
|
||
Attachment #752355 -
Flags: review?(josh)
| Assignee | ||
Updated•12 years ago
|
Attachment #752350 -
Attachment is obsolete: true
Attachment #752350 -
Flags: feedback?(jimb)
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bugs
| Reporter | ||
Comment 4•12 years ago
|
||
Wow, fast work!
| Assignee | ||
Comment 5•12 years ago
|
||
Updated•12 years ago
|
Attachment #752355 -
Flags: review?(josh) → review+
| Assignee | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•