Bug 1343388 - Assert against the servo traversal when serializing gecko declarations. r=emilio

MozReview-Commit-ID: LnYYbx742X1
This commit is contained in:
Bobby Holley 2017-02-28 15:58:31 -08:00
Родитель 8c29783059
Коммит 6b6a1d5204
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -12,6 +12,7 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/css/Rule.h"
#include "nsPrintfCString.h"
@ -1702,6 +1703,10 @@ Declaration::AppendVariableAndValueToString(const nsAString& aName,
void
Declaration::ToString(nsAString& aString) const
{
// Tell the static analysis not to worry about thread-unsafe things here
// because because this function isn't reached during parallel style traversal.
MOZ_ASSERT(!ServoStyleSet::IsInServoTraversal());
nsCSSCompressedDataBlock *systemFontData =
GetPropertyIsImportantByID(eCSSProperty__x_system_font) ? mImportantData
: mData;