Bug 1403397 - Revert: Add a testing API. r=bholley

This reverts commit 4194b7dd8ec748c044a9b8b0967fd9d652ea342c.
This commit is contained in:
Bobby Holley 2017-10-03 10:08:21 -07:00
Родитель 15597d7207
Коммит ef26283b2d
6 изменённых файлов: 0 добавлений и 40 удалений

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

@ -326,20 +326,5 @@ ChromeUtils::IsOriginAttributesEqual(const dom::OriginAttributesDictionary& aA,
aA.mPrivateBrowsingId == aB.mPrivateBrowsingId;
}
/* static */ void
ChromeUtils::CorruptRuleHashAndCrash(GlobalObject& aGlobal,
unsigned long aIndex)
{
nsCOMPtr<nsPIDOMWindowInner> win = do_QueryInterface(aGlobal.GetAsSupports());
NS_ENSURE_TRUE_VOID(win);
nsIDocument* doc = win->GetExtantDoc();
NS_ENSURE_TRUE_VOID(doc);
nsIPresShell* shell = doc->GetShell();
NS_ENSURE_TRUE_VOID(shell);
NS_ENSURE_TRUE_VOID(shell->StyleSet() && shell->StyleSet()->IsServo());
ServoStyleSet* set = shell->StyleSet()->AsServo();
set->CorruptRuleHashAndCrash(aIndex);
}
} // namespace dom
} // namespace mozilla

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

@ -145,9 +145,6 @@ public:
JS::HandleObject aTarget,
JS::MutableHandleObject aRetval,
ErrorResult& aRv);
static void CorruptRuleHashAndCrash(GlobalObject& aGlobal,
unsigned long aIndex);
};
} // namespace dom

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

@ -101,12 +101,6 @@ interface ChromeUtils : ThreadSafeChromeUtils {
*/
[Throws]
static object shallowClone(object obj, optional object? target = null);
/**
* Temporary testing method to verify that nightly builds will crash when
* the rulehash is corrupted. See bug 1403397.
*/
static void corruptRuleHashAndCrash(unsigned long index);
};
/**

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

@ -673,10 +673,6 @@ SERVO_BINDING_FUNC(Servo_ReleaseArcStringData, void,
SERVO_BINDING_FUNC(Servo_CloneArcStringData, mozilla::ServoRawOffsetArc<RustString>,
const mozilla::ServoRawOffsetArc<RustString>* string);
SERVO_BINDING_FUNC(Servo_CorruptRuleHashAndCrash, void,
RawServoStyleSetBorrowed set,
size_t index);
// AddRef / Release functions
#define SERVO_ARC_TYPE(name_, type_) \
SERVO_BINDING_FUNC(Servo_##name_##_AddRef, void, type_##Borrowed) \

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

@ -1571,13 +1571,6 @@ ServoStyleSet::ReparentStyleContext(ServoStyleContext* aStyleContext,
aElement, mRawSet.get()).Consume();
}
void
ServoStyleSet::CorruptRuleHashAndCrash(unsigned long aIndex)
{
Servo_CorruptRuleHashAndCrash(mRawSet.get(), (size_t) aIndex);
}
NS_IMPL_ISUPPORTS(UACacheReporter, nsIMemoryReporter)
MOZ_DEFINE_MALLOC_SIZE_OF(ServoUACacheMallocSizeOf)

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

@ -481,11 +481,6 @@ public:
ServoStyleContext* aNewLayoutParent,
Element* aElement);
/**
* Temporary testing method. See bug 1403397.
*/
void CorruptRuleHashAndCrash(unsigned long aIndex);
private:
friend class AutoSetInServoTraversal;
friend class AutoPrepareTraversal;