Closed
Bug 874592
Opened 11 years ago
Closed 11 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•11 years ago
|
||
Make if (!nsFrameMessageManager::sParentProcessManager) { to create parent process mm using GetInterface?
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #752350 -
Flags: feedback?(jimb)
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #752355 -
Flags: review?(josh)
Assignee | ||
Updated•11 years ago
|
Attachment #752350 -
Attachment is obsolete: true
Attachment #752350 -
Flags: feedback?(jimb)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bugs
Reporter | ||
Comment 4•11 years ago
|
||
Wow, fast work!
Assignee | ||
Comment 5•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=795837519810
Updated•11 years ago
|
Attachment #752355 -
Flags: review?(josh) → review+
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a15bb4360f9
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4a15bb4360f9
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•