mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 899881 - Don't allow frames to have a null style context. r=dbaron
This commit is contained in:
parent
f304825fbc
commit
7389a04520
@ -394,7 +394,6 @@ nsFrame::~nsFrame()
|
||||
MOZ_COUNT_DTOR(nsFrame);
|
||||
|
||||
NS_IF_RELEASE(mContent);
|
||||
if (mStyleContext)
|
||||
mStyleContext->Release();
|
||||
}
|
||||
|
||||
|
@ -751,11 +751,8 @@ public:
|
||||
if (aContext != mStyleContext) {
|
||||
nsStyleContext* oldStyleContext = mStyleContext;
|
||||
mStyleContext = aContext;
|
||||
if (aContext) {
|
||||
aContext->AddRef();
|
||||
DidSetStyleContext(oldStyleContext);
|
||||
}
|
||||
if (oldStyleContext)
|
||||
oldStyleContext->Release();
|
||||
}
|
||||
}
|
||||
@ -769,14 +766,11 @@ public:
|
||||
void SetStyleContextWithoutNotification(nsStyleContext* aContext)
|
||||
{
|
||||
if (aContext != mStyleContext) {
|
||||
if (mStyleContext)
|
||||
mStyleContext->Release();
|
||||
mStyleContext = aContext;
|
||||
if (aContext) {
|
||||
aContext->AddRef();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Style post processing hook
|
||||
// Attention: the old style context is the one we're forgetting,
|
||||
|
Loading…
Reference in New Issue
Block a user