mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 28555: fix large leak of StyleContextImpl's. r=karnaze@netscape.com a=jar@netscape.com
This commit is contained in:
parent
3c1d11233c
commit
8438b1f02d
@ -189,10 +189,15 @@ const nsStyleColor* nsStyleUtil::FindNonTransparentBackground(nsIStyleContext* a
|
||||
PRBool aStartAtParent /*= PR_FALSE*/)
|
||||
{
|
||||
const nsStyleColor* result = nsnull;
|
||||
nsIStyleContext* context = aStartAtParent ? aContext->GetParent() : aContext;
|
||||
nsIStyleContext* context;
|
||||
if (aStartAtParent) {
|
||||
context = aContext->GetParent(); // balance ending release
|
||||
} else {
|
||||
context = aContext;
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
}
|
||||
NS_ASSERTION( context != nsnull, "Cannot find NonTransparentBackground in a null context" );
|
||||
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
while (nsnull != context) {
|
||||
result = (const nsStyleColor*)context->GetStyleData(eStyleStruct_Color);
|
||||
|
||||
|
@ -189,10 +189,15 @@ const nsStyleColor* nsStyleUtil::FindNonTransparentBackground(nsIStyleContext* a
|
||||
PRBool aStartAtParent /*= PR_FALSE*/)
|
||||
{
|
||||
const nsStyleColor* result = nsnull;
|
||||
nsIStyleContext* context = aStartAtParent ? aContext->GetParent() : aContext;
|
||||
nsIStyleContext* context;
|
||||
if (aStartAtParent) {
|
||||
context = aContext->GetParent(); // balance ending release
|
||||
} else {
|
||||
context = aContext;
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
}
|
||||
NS_ASSERTION( context != nsnull, "Cannot find NonTransparentBackground in a null context" );
|
||||
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
while (nsnull != context) {
|
||||
result = (const nsStyleColor*)context->GetStyleData(eStyleStruct_Color);
|
||||
|
||||
|
@ -189,10 +189,15 @@ const nsStyleColor* nsStyleUtil::FindNonTransparentBackground(nsIStyleContext* a
|
||||
PRBool aStartAtParent /*= PR_FALSE*/)
|
||||
{
|
||||
const nsStyleColor* result = nsnull;
|
||||
nsIStyleContext* context = aStartAtParent ? aContext->GetParent() : aContext;
|
||||
nsIStyleContext* context;
|
||||
if (aStartAtParent) {
|
||||
context = aContext->GetParent(); // balance ending release
|
||||
} else {
|
||||
context = aContext;
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
}
|
||||
NS_ASSERTION( context != nsnull, "Cannot find NonTransparentBackground in a null context" );
|
||||
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
while (nsnull != context) {
|
||||
result = (const nsStyleColor*)context->GetStyleData(eStyleStruct_Color);
|
||||
|
||||
|
@ -189,10 +189,15 @@ const nsStyleColor* nsStyleUtil::FindNonTransparentBackground(nsIStyleContext* a
|
||||
PRBool aStartAtParent /*= PR_FALSE*/)
|
||||
{
|
||||
const nsStyleColor* result = nsnull;
|
||||
nsIStyleContext* context = aStartAtParent ? aContext->GetParent() : aContext;
|
||||
nsIStyleContext* context;
|
||||
if (aStartAtParent) {
|
||||
context = aContext->GetParent(); // balance ending release
|
||||
} else {
|
||||
context = aContext;
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
}
|
||||
NS_ASSERTION( context != nsnull, "Cannot find NonTransparentBackground in a null context" );
|
||||
|
||||
NS_IF_ADDREF(context); // balance ending release
|
||||
while (nsnull != context) {
|
||||
result = (const nsStyleColor*)context->GetStyleData(eStyleStruct_Color);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user