Keep a reference to the style context for the lifetime of AttributeChanged(), so it's not deleted out from under us when the frame is destroyed. Fixes crasher bug 194584. r/sr=dbaron.

This commit is contained in:
bryner%netscape.com 2003-02-23 23:02:26 +00:00
Родитель 44456f91a9
Коммит 574c127ea3
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -10680,7 +10680,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
// check for inline style. we need to clear the data at the style // check for inline style. we need to clear the data at the style
// context's rule node whenever the inline style property changes. // context's rule node whenever the inline style property changes.
nsStyleContext* styleContext = nsnull; nsRefPtr<nsStyleContext> styleContext;
nsCOMPtr<nsIStyleRule> rule; nsCOMPtr<nsIStyleRule> rule;
PRBool inlineStyle = PR_FALSE; PRBool inlineStyle = PR_FALSE;
if (aAttribute == nsHTMLAtoms::style) { if (aAttribute == nsHTMLAtoms::style) {

Просмотреть файл

@ -10680,7 +10680,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext,
// check for inline style. we need to clear the data at the style // check for inline style. we need to clear the data at the style
// context's rule node whenever the inline style property changes. // context's rule node whenever the inline style property changes.
nsStyleContext* styleContext = nsnull; nsRefPtr<nsStyleContext> styleContext;
nsCOMPtr<nsIStyleRule> rule; nsCOMPtr<nsIStyleRule> rule;
PRBool inlineStyle = PR_FALSE; PRBool inlineStyle = PR_FALSE;
if (aAttribute == nsHTMLAtoms::style) { if (aAttribute == nsHTMLAtoms::style) {