зеркало из https://github.com/mozilla/gecko-dev.git
Bug 723446. Be a little more careful changing declarations on keyframe rules. r=dbaron
This commit is contained in:
Родитель
14dbecbda4
Коммит
a479b4be2a
|
@ -1964,7 +1964,11 @@ nsCSSKeyframeRule::GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
|
|||
void
|
||||
nsCSSKeyframeRule::ChangeDeclaration(css::Declaration* aDeclaration)
|
||||
{
|
||||
mDeclaration = aDeclaration;
|
||||
// Be careful to not assign to an nsAutoPtr if we would be assigning
|
||||
// the thing it already holds.
|
||||
if (aDeclaration != mDeclaration) {
|
||||
mDeclaration = aDeclaration;
|
||||
}
|
||||
|
||||
if (mSheet) {
|
||||
mSheet->SetModifiedByChildRule();
|
||||
|
|
|
@ -66,6 +66,7 @@ class nsAutoPtr
|
|||
void
|
||||
assign( T* newPtr )
|
||||
{
|
||||
NS_ABORT_IF_FALSE(mRawPtr != newPtr || !newPtr, "This makes no sense!");
|
||||
T* oldPtr = mRawPtr;
|
||||
mRawPtr = newPtr;
|
||||
delete oldPtr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче