diff --git a/content/html/style/src/nsHTMLStyleSheet.cpp b/content/html/style/src/nsHTMLStyleSheet.cpp
index 7451779353a4..91063b7f659c 100644
--- a/content/html/style/src/nsHTMLStyleSheet.cpp
+++ b/content/html/style/src/nsHTMLStyleSheet.cpp
@@ -2680,6 +2680,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
if (aTag == nsnull)
return NS_OK;
+ nsXULAtoms::AddrefAtoms();
PRInt32 nameSpaceID;
if (NS_SUCCEEDED(aContent->GetNameSpaceID(nameSpaceID)) &&
nameSpaceID == nsXULAtoms::nameSpaceID) {
@@ -2732,6 +2733,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
// Add the table frame to the flow
aFrameItems.AddChild(aNewFrame);
}
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treeitem)
@@ -2745,6 +2747,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
aFrameItems, aFixedItems);
// No more work to do.
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treechildren)
@@ -2779,6 +2782,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
}
// No more work to do.
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treerow)
@@ -2801,6 +2805,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
rv = ConstructTreeCellFrame(aPresContext, aContent, aParentFrame, aStyleContext,
aAbsoluteItems, aNewFrame, aFixedItems, allowEvents);
aFrameItems.AddChild(aNewFrame);
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treeindentation)
@@ -2859,7 +2864,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
aFrameItems.AddChild(placeholderFrame);
}
}
-
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
diff --git a/layout/html/style/src/nsHTMLStyleSheet.cpp b/layout/html/style/src/nsHTMLStyleSheet.cpp
index 7451779353a4..91063b7f659c 100644
--- a/layout/html/style/src/nsHTMLStyleSheet.cpp
+++ b/layout/html/style/src/nsHTMLStyleSheet.cpp
@@ -2680,6 +2680,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
if (aTag == nsnull)
return NS_OK;
+ nsXULAtoms::AddrefAtoms();
PRInt32 nameSpaceID;
if (NS_SUCCEEDED(aContent->GetNameSpaceID(nameSpaceID)) &&
nameSpaceID == nsXULAtoms::nameSpaceID) {
@@ -2732,6 +2733,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
// Add the table frame to the flow
aFrameItems.AddChild(aNewFrame);
}
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treeitem)
@@ -2745,6 +2747,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
aFrameItems, aFixedItems);
// No more work to do.
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treechildren)
@@ -2779,6 +2782,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
}
// No more work to do.
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treerow)
@@ -2801,6 +2805,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
rv = ConstructTreeCellFrame(aPresContext, aContent, aParentFrame, aStyleContext,
aAbsoluteItems, aNewFrame, aFixedItems, allowEvents);
aFrameItems.AddChild(aNewFrame);
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treeindentation)
@@ -2859,7 +2864,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
aFrameItems.AddChild(placeholderFrame);
}
}
-
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
diff --git a/layout/style/nsHTMLStyleSheet.cpp b/layout/style/nsHTMLStyleSheet.cpp
index 7451779353a4..91063b7f659c 100644
--- a/layout/style/nsHTMLStyleSheet.cpp
+++ b/layout/style/nsHTMLStyleSheet.cpp
@@ -2680,6 +2680,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
if (aTag == nsnull)
return NS_OK;
+ nsXULAtoms::AddrefAtoms();
PRInt32 nameSpaceID;
if (NS_SUCCEEDED(aContent->GetNameSpaceID(nameSpaceID)) &&
nameSpaceID == nsXULAtoms::nameSpaceID) {
@@ -2732,6 +2733,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
// Add the table frame to the flow
aFrameItems.AddChild(aNewFrame);
}
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treeitem)
@@ -2745,6 +2747,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
aFrameItems, aFixedItems);
// No more work to do.
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treechildren)
@@ -2779,6 +2782,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
}
// No more work to do.
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treerow)
@@ -2801,6 +2805,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
rv = ConstructTreeCellFrame(aPresContext, aContent, aParentFrame, aStyleContext,
aAbsoluteItems, aNewFrame, aFixedItems, allowEvents);
aFrameItems.AddChild(aNewFrame);
+ nsXULAtoms::ReleaseAtoms();
return rv;
}
else if (aTag == nsXULAtoms::treeindentation)
@@ -2859,7 +2864,7 @@ HTMLStyleSheetImpl::ConstructXULFrame(nsIPresContext* aPresContext,
aFrameItems.AddChild(placeholderFrame);
}
}
-
+ nsXULAtoms::ReleaseAtoms();
return rv;
}