diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 1dee4e55a4ff..7dd9bd2f83df 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -1155,18 +1155,17 @@ nsImageFrame::HandleEvent(nsIPresContext* aPresContext, absURL, target, altText, &suppress); } - + if (!inside && isServerMap) { suppress = GetSuppress(); - nsIURI* baseURL = nsnull; - GetBaseURI(&baseURL); + nsCOMPtr baseURL; + GetBaseURI(getter_AddRefs(baseURL)); // Server side image maps use the href in a containing anchor // element to provide the basis for the destination url. nsAutoString src; if (GetAnchorHREFAndTarget(src, target)) { NS_MakeAbsoluteURI(absURL, src, baseURL); - NS_IF_RELEASE(baseURL); // XXX if the mouse is over/clicked in the border/padding area // we should probably just pretend nothing happened. Nav4 diff --git a/layout/html/base/src/nsImageFrame.cpp b/layout/html/base/src/nsImageFrame.cpp index 1dee4e55a4ff..7dd9bd2f83df 100644 --- a/layout/html/base/src/nsImageFrame.cpp +++ b/layout/html/base/src/nsImageFrame.cpp @@ -1155,18 +1155,17 @@ nsImageFrame::HandleEvent(nsIPresContext* aPresContext, absURL, target, altText, &suppress); } - + if (!inside && isServerMap) { suppress = GetSuppress(); - nsIURI* baseURL = nsnull; - GetBaseURI(&baseURL); + nsCOMPtr baseURL; + GetBaseURI(getter_AddRefs(baseURL)); // Server side image maps use the href in a containing anchor // element to provide the basis for the destination url. nsAutoString src; if (GetAnchorHREFAndTarget(src, target)) { NS_MakeAbsoluteURI(absURL, src, baseURL); - NS_IF_RELEASE(baseURL); // XXX if the mouse is over/clicked in the border/padding area // we should probably just pretend nothing happened. Nav4