зеркало из https://github.com/mozilla/gecko-dev.git
Bug 899881 - Don't allow frames to have a null style context. r=dbaron
This commit is contained in:
Родитель
67614e96b8
Коммит
1c674f84da
|
@ -394,8 +394,7 @@ nsFrame::~nsFrame()
|
||||||
MOZ_COUNT_DTOR(nsFrame);
|
MOZ_COUNT_DTOR(nsFrame);
|
||||||
|
|
||||||
NS_IF_RELEASE(mContent);
|
NS_IF_RELEASE(mContent);
|
||||||
if (mStyleContext)
|
mStyleContext->Release();
|
||||||
mStyleContext->Release();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMPL_FRAMEARENA_HELPERS(nsFrame)
|
NS_IMPL_FRAMEARENA_HELPERS(nsFrame)
|
||||||
|
|
|
@ -751,12 +751,9 @@ public:
|
||||||
if (aContext != mStyleContext) {
|
if (aContext != mStyleContext) {
|
||||||
nsStyleContext* oldStyleContext = mStyleContext;
|
nsStyleContext* oldStyleContext = mStyleContext;
|
||||||
mStyleContext = aContext;
|
mStyleContext = aContext;
|
||||||
if (aContext) {
|
aContext->AddRef();
|
||||||
aContext->AddRef();
|
DidSetStyleContext(oldStyleContext);
|
||||||
DidSetStyleContext(oldStyleContext);
|
oldStyleContext->Release();
|
||||||
}
|
|
||||||
if (oldStyleContext)
|
|
||||||
oldStyleContext->Release();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -769,12 +766,9 @@ public:
|
||||||
void SetStyleContextWithoutNotification(nsStyleContext* aContext)
|
void SetStyleContextWithoutNotification(nsStyleContext* aContext)
|
||||||
{
|
{
|
||||||
if (aContext != mStyleContext) {
|
if (aContext != mStyleContext) {
|
||||||
if (mStyleContext)
|
mStyleContext->Release();
|
||||||
mStyleContext->Release();
|
|
||||||
mStyleContext = aContext;
|
mStyleContext = aContext;
|
||||||
if (aContext) {
|
aContext->AddRef();
|
||||||
aContext->AddRef();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче