Closed
Bug 1265273
Opened 8 years ago
Closed 8 years ago
Add two missing get_PBrowserParent() null checks
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
(Whiteboard: btpp-active)
Attachments
(1 file)
2.48 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
Most calls to get_PBrowserParent() have their return value null checked, but two don't. This patch adds checks for those two calls.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8742167 -
Flags: review?(jmathies)
Comment on attachment 8742167 [details] [diff] [review] Add two missing get_PBrowserParent() null checks Review of attachment 8742167 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/ipc/nsIContentParent.cpp @@ +136,5 @@ > // type PopupIPCTabContext, and that the opener TabParent is > // reachable. > const PopupIPCTabContext& popupContext = aContext.get_PopupIPCTabContext(); > auto opener = TabParent::GetFrom(popupContext.opener().get_PBrowserParent()); > + if (!opener) { I think we already check this in CanOpenBrowser.
Updated•8 years ago
|
Whiteboard: btpp-active
Comment 3•8 years ago
|
||
Comment on attachment 8742167 [details] [diff] [review] Add two missing get_PBrowserParent() null checks Review of attachment 8742167 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/ipc/TabContext.cpp @@ +253,5 @@ > + if (!context) { > + mInvalidReason = "Child is-browser process tried to " > + "open a null tab."; > + return; > + } looks like a good check to add afaict. ::: dom/ipc/nsIContentParent.cpp @@ +138,5 @@ > const PopupIPCTabContext& popupContext = aContext.get_PopupIPCTabContext(); > auto opener = TabParent::GetFrom(popupContext.opener().get_PBrowserParent()); > + if (!opener) { > + return nullptr; > + } yep, looks like someone recently added this check.
Attachment #8742167 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 4•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8b29568cb7e23d313b054d5cfcb02a62d24b504e Bug 1265273 - Add two missing get_PBrowserParent() null checks. r=jimm.
Assignee | ||
Comment 5•8 years ago
|
||
Oh, I forgot to update the commit message. The landed patch only added the one check.
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8b29568cb7e2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•