mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
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:
parent
15abb6f63e
commit
4471abc361
@ -134,10 +134,14 @@ AnimationEffectTiming::SetEasing(JSContext* aCx,
|
|||||||
const nsAString& aEasing,
|
const nsAString& aEasing,
|
||||||
ErrorResult& aRv)
|
ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
nsIDocument* document = AnimationUtils::GetCurrentRealmDocument(aCx);
|
||||||
|
if (!document) {
|
||||||
|
aRv.Throw(NS_ERROR_FAILURE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Maybe<ComputedTimingFunction> newFunction =
|
Maybe<ComputedTimingFunction> newFunction =
|
||||||
TimingParams::ParseEasing(aEasing,
|
TimingParams::ParseEasing(aEasing, document, aRv);
|
||||||
AnimationUtils::GetCurrentRealmDocument(aCx),
|
|
||||||
aRv);
|
|
||||||
if (aRv.Failed()) {
|
if (aRv.Failed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user