fix leaks
This commit is contained in:
Родитель
76461eca1f
Коммит
c839e3a447
|
@ -30,7 +30,7 @@ class ContextKey : public nsHashKey {
|
|||
public:
|
||||
ContextKey(nsIStyleContext* aContext);
|
||||
ContextKey(nsIStyleContext* aParent, nsISupportsArray* aRules);
|
||||
~ContextKey(void);
|
||||
virtual ~ContextKey(void);
|
||||
|
||||
void SetContext(nsIStyleContext* aContext);
|
||||
|
||||
|
|
|
@ -276,7 +276,6 @@ void CSSStyleSheetImpl::AppendStyleSheet(nsICSSStyleSheet* aSheet)
|
|||
void CSSStyleSheetImpl::PrependStyleRule(nsICSSStyleRule* aRule)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aRule, "null arg");
|
||||
NS_ADDREF(aRule);
|
||||
//XXX replace this with a binary search?
|
||||
PRInt32 weight = aRule->GetWeight();
|
||||
if (nsnull == mRules) {
|
||||
|
@ -298,7 +297,6 @@ void CSSStyleSheetImpl::PrependStyleRule(nsICSSStyleRule* aRule)
|
|||
void CSSStyleSheetImpl::AppendStyleRule(nsICSSStyleRule* aRule)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aRule, "null arg");
|
||||
NS_ADDREF(aRule);
|
||||
|
||||
//XXX replace this with a binary search?
|
||||
PRInt32 weight = aRule->GetWeight();
|
||||
|
|
|
@ -425,7 +425,7 @@ void nsPresContext::StopLoadImage(nsIFrame* aForFrame)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsPresContext::SetLinkHandler(nsILinkHandler* aHandler)
|
||||
{
|
||||
{ // XXX should probably be a WEAK reference
|
||||
NS_IF_RELEASE(mLinkHandler);
|
||||
mLinkHandler = aHandler;
|
||||
NS_IF_ADDREF(aHandler);
|
||||
|
@ -444,7 +444,7 @@ NS_IMETHODIMP nsPresContext::GetLinkHandler(nsILinkHandler** aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsPresContext::SetContainer(nsISupports* aHandler)
|
||||
{
|
||||
{ // XXX should most likely be a WEAK reference
|
||||
NS_IF_RELEASE(mContainer);
|
||||
mContainer = aHandler;
|
||||
NS_IF_ADDREF(aHandler);
|
||||
|
|
|
@ -425,7 +425,7 @@ void nsPresContext::StopLoadImage(nsIFrame* aForFrame)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsPresContext::SetLinkHandler(nsILinkHandler* aHandler)
|
||||
{
|
||||
{ // XXX should probably be a WEAK reference
|
||||
NS_IF_RELEASE(mLinkHandler);
|
||||
mLinkHandler = aHandler;
|
||||
NS_IF_ADDREF(aHandler);
|
||||
|
@ -444,7 +444,7 @@ NS_IMETHODIMP nsPresContext::GetLinkHandler(nsILinkHandler** aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP nsPresContext::SetContainer(nsISupports* aHandler)
|
||||
{
|
||||
{ // XXX should most likely be a WEAK reference
|
||||
NS_IF_RELEASE(mContainer);
|
||||
mContainer = aHandler;
|
||||
NS_IF_ADDREF(aHandler);
|
||||
|
|
|
@ -30,7 +30,7 @@ class ContextKey : public nsHashKey {
|
|||
public:
|
||||
ContextKey(nsIStyleContext* aContext);
|
||||
ContextKey(nsIStyleContext* aParent, nsISupportsArray* aRules);
|
||||
~ContextKey(void);
|
||||
virtual ~ContextKey(void);
|
||||
|
||||
void SetContext(nsIStyleContext* aContext);
|
||||
|
||||
|
|
|
@ -276,7 +276,6 @@ void CSSStyleSheetImpl::AppendStyleSheet(nsICSSStyleSheet* aSheet)
|
|||
void CSSStyleSheetImpl::PrependStyleRule(nsICSSStyleRule* aRule)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aRule, "null arg");
|
||||
NS_ADDREF(aRule);
|
||||
//XXX replace this with a binary search?
|
||||
PRInt32 weight = aRule->GetWeight();
|
||||
if (nsnull == mRules) {
|
||||
|
@ -298,7 +297,6 @@ void CSSStyleSheetImpl::PrependStyleRule(nsICSSStyleRule* aRule)
|
|||
void CSSStyleSheetImpl::AppendStyleRule(nsICSSStyleRule* aRule)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aRule, "null arg");
|
||||
NS_ADDREF(aRule);
|
||||
|
||||
//XXX replace this with a binary search?
|
||||
PRInt32 weight = aRule->GetWeight();
|
||||
|
|
|
@ -276,7 +276,6 @@ void CSSStyleSheetImpl::AppendStyleSheet(nsICSSStyleSheet* aSheet)
|
|||
void CSSStyleSheetImpl::PrependStyleRule(nsICSSStyleRule* aRule)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aRule, "null arg");
|
||||
NS_ADDREF(aRule);
|
||||
//XXX replace this with a binary search?
|
||||
PRInt32 weight = aRule->GetWeight();
|
||||
if (nsnull == mRules) {
|
||||
|
@ -298,7 +297,6 @@ void CSSStyleSheetImpl::PrependStyleRule(nsICSSStyleRule* aRule)
|
|||
void CSSStyleSheetImpl::AppendStyleRule(nsICSSStyleRule* aRule)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aRule, "null arg");
|
||||
NS_ADDREF(aRule);
|
||||
|
||||
//XXX replace this with a binary search?
|
||||
PRInt32 weight = aRule->GetWeight();
|
||||
|
|
|
@ -30,7 +30,7 @@ class ContextKey : public nsHashKey {
|
|||
public:
|
||||
ContextKey(nsIStyleContext* aContext);
|
||||
ContextKey(nsIStyleContext* aParent, nsISupportsArray* aRules);
|
||||
~ContextKey(void);
|
||||
virtual ~ContextKey(void);
|
||||
|
||||
void SetContext(nsIStyleContext* aContext);
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ nsIDocument* WebWidgetImpl::GetDocument()
|
|||
}
|
||||
|
||||
NS_IMETHODIMP WebWidgetImpl::SetLinkHandler(nsILinkHandler* aHandler)
|
||||
{
|
||||
{ // XXX this should probably be a WEAK reference
|
||||
NS_IF_RELEASE(mLinkHandler);
|
||||
mLinkHandler = aHandler;
|
||||
NS_IF_ADDREF(aHandler);
|
||||
|
@ -468,7 +468,7 @@ NS_IMETHODIMP WebWidgetImpl::GetLinkHandler(nsILinkHandler** aResult)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP WebWidgetImpl::SetContainer(nsISupports* aContainer)
|
||||
{
|
||||
{ // XXX this should most likely be a WEAK reference
|
||||
NS_IF_RELEASE(mContainer);
|
||||
mContainer = aContainer;
|
||||
NS_IF_ADDREF(aContainer);
|
||||
|
|
Загрузка…
Ссылка в новой задаче