Bug 1275449 - Part 1: AnimationEffectTiming::SetEasing crash in page-mode addon context. r=hiro

MozReview-Commit-ID: DeyC4BiXJNo

--HG--
extra : transplant_source : %AE6%85a_%96%F6%A0%E3%3B%20g%07%14%CF%8F%F2%CA%D7o
This commit is contained in:
Daisuke Akatsuka 2016-06-01 17:40:11 +09:00
parent 15abb6f63e
commit 4471abc361

View File

@ -134,10 +134,14 @@ AnimationEffectTiming::SetEasing(JSContext* aCx,
const nsAString& aEasing,
ErrorResult& aRv)
{
nsIDocument* document = AnimationUtils::GetCurrentRealmDocument(aCx);
if (!document) {
aRv.Throw(NS_ERROR_FAILURE);
return;
}
Maybe<ComputedTimingFunction> newFunction =
TimingParams::ParseEasing(aEasing,
AnimationUtils::GetCurrentRealmDocument(aCx),
aRv);
TimingParams::ParseEasing(aEasing, document, aRv);
if (aRv.Failed()) {
return;
}