Bug 1325141: Fix leak in Z-constrained windows on OS-X. r?enndeakin,jmaher
MozReview-Commit-ID: J4NRd315XnT
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -2212,17 +2212,16 @@ toolbar#nav-bar {
# backed out. Rather than waiting and risking new regressions, in the meantime
# this code will selectively disable leak checking on flavors/directories where
# known regressions exist. At least this way we can prevent further damage while
# they get fixed.
info = mozinfo.info
skip_leak_conditions = [
(info['debug'] and options.flavor == 'plain' and d.startswith('toolkit/components/extensions/test/mochitest') and info['os'] == 'mac', 'bug 1326456'), # noqa
- (info['debug'] and options.flavor == 'browser' and d.startswith('browser/components/extensions/test/browser') and info['os'] == 'mac', 'bug 1325141'), # noqa
(info['debug'] and options.flavor == 'plain' and d == 'dom/animation/test/css-animations', 'bug 1325277'), # noqa
(info['debug'] and options.flavor == 'plain' and d == 'dom/tests/mochitest/gamepad' and info['os'] == 'win', 'bug 1324592'), # noqa
(info['debug'] and options.flavor == 'plain' and d == 'toolkit/components/prompts/test' and info['os'] == 'mac', 'bug 1325275'), # noqa
(info['debug'] and options.flavor == 'plain' and d == 'tests/dom/xhr/tests', 'bug 1325438'), # noqa
]
for condition, reason in skip_leak_conditions:
if condition:
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
@@ -1842,19 +1842,19 @@ NS_IMETHODIMP nsCocoaWindow::Invalidate(
bool nsCocoaWindow::DragEvent(unsigned int aMessage, mozilla::gfx::Point aMouseGlobal, UInt16 aKeyModifiers)
{
return false;
}
NS_IMETHODIMP nsCocoaWindow::SendSetZLevelEvent()
{
nsWindowZ placement = nsWindowZTop;
- nsIWidget* actualBelow;
+ nsCOMPtr<nsIWidget> actualBelow;
if (mWidgetListener)
- mWidgetListener->ZLevelChanged(true, &placement, nullptr, &actualBelow);
+ mWidgetListener->ZLevelChanged(true, &placement, nullptr, getter_AddRefs(actualBelow));
return NS_OK;
}
NS_IMETHODIMP nsCocoaWindow::GetChildSheet(bool aShown, nsIWidget** _retval)
{
nsIWidget* child = GetFirstChild();
while (child) {