nsViewManager::CreateView() takes a parameter "const nsView* aParent", which it proceeds to const_cast to a nsView*. So the constness is a bit of a sham there. Meanwhile, based on a quick sampling of its callers, it seems that it generally gets passed a "nsView*" -- so there doesn't seem to be any need for the parameter to be const. Filing this bug on making that parameter just a normal "nsView*", assuming I'm not missing any trouble that that'd cause. Marking dependency on Bug 848218, since this touches the same code that that patch touches, and I think the patch here should land after Bug 848218 so as not to bitrot it.
Created attachment 726967 [details] [diff] [review] fix This builds locally for me, so I think it's valid.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #726967 - Flags: review?(bzbarsky)
and by Bug 848218 in comment 0, I of course meant bug 852428. (I copypasted the wrong bug number from the top of an attachment page on that bug.)
Created attachment 726970 [details] [diff] [review] fix (layered on top of bug 852428's patches) Here's the patch again, bitrot-fixed to layer on top of bug 852428's patches (since I don't intend to land this until after bug 852428 lands).
Comment on attachment 726970 [details] [diff] [review] fix (layered on top of bug 852428's patches) r=me
Attachment #726970 - Flags: review?(bzbarsky) → review+
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.