зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1368690: Move EnsureUniqueInner call after all the members have been initialized. r=xidorn
MozReview-Commit-ID: GoeLsjSAU00
This commit is contained in:
Родитель
e2b80fffd2
Коммит
d7b79ff0f9
|
@ -361,6 +361,15 @@ CSSStyleSheet::CSSStyleSheet(const CSSStyleSheet& aCopy,
|
|||
mRuleProcessors(nullptr)
|
||||
{
|
||||
mParent = aParentToUse;
|
||||
|
||||
if (mDirty) { // CSSOM's been there, force full copy now
|
||||
NS_ASSERTION(mInner->mComplete, "Why have rules been accessed on an incomplete sheet?");
|
||||
// FIXME: handle failure?
|
||||
//
|
||||
// NOTE: It's important to call this from the subclass, since it could
|
||||
// access uninitialized members otherwise.
|
||||
EnsureUniqueInner();
|
||||
}
|
||||
}
|
||||
|
||||
CSSStyleSheet::~CSSStyleSheet()
|
||||
|
|
|
@ -87,6 +87,15 @@ ServoStyleSheet::ServoStyleSheet(const ServoStyleSheet& aCopy,
|
|||
: StyleSheet(aCopy, aOwnerRuleToUse, aDocumentToUse, aOwningNodeToUse)
|
||||
{
|
||||
mParent = aParentToUse;
|
||||
|
||||
if (mDirty) { // CSSOM's been there, force full copy now
|
||||
NS_ASSERTION(mInner->mComplete, "Why have rules been accessed on an incomplete sheet?");
|
||||
// FIXME: handle failure?
|
||||
//
|
||||
// NOTE: It's important to call this from the subclass, since this could
|
||||
// access uninitialized members otherwise.
|
||||
EnsureUniqueInner();
|
||||
}
|
||||
}
|
||||
|
||||
ServoStyleSheet::~ServoStyleSheet()
|
||||
|
|
|
@ -54,12 +54,6 @@ StyleSheet::StyleSheet(const StyleSheet& aCopy,
|
|||
MOZ_ASSERT(mInner, "Should only copy StyleSheets with an mInner.");
|
||||
mInner->AddSheet(this);
|
||||
|
||||
if (mDirty) { // CSSOM's been there, force full copy now
|
||||
NS_ASSERTION(mInner->mComplete, "Why have rules been accessed on an incomplete sheet?");
|
||||
// FIXME: handle failure?
|
||||
EnsureUniqueInner();
|
||||
}
|
||||
|
||||
if (aCopy.mMedia) {
|
||||
// XXX This is wrong; we should be keeping @import rules and
|
||||
// sheets in sync!
|
||||
|
|
Загрузка…
Ссылка в новой задаче