summary refs log tree commit diff
path: root/gnu/packages/patches/icecat-CVE-2016-1952-pt04.patch
blob: 4eeb2377b00b1276a0464045368d12643488b258 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Copied from upstream:
https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/9dd60e798819

# HG changeset patch
# User Olli Pettay <bugs@pettay.fi>
# Date 1455204078 -3600
# Node ID 9dd60e798819fe2ebf1e5bd36aa9006ecd2f82c9
# Parent  c1d67bd4c993b9e344c68954e6f0392c82b81e38
Bug 1244250 - r=mats, a=al

diff --git a/layout/style/nsAnimationManager.cpp b/layout/style/nsAnimationManager.cpp
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -715,16 +715,17 @@ nsAnimationManager::FlushAnimations(Flus
   }
 
   DispatchEvents(); // may destroy us
 }
 
 void
 nsAnimationManager::DoDispatchEvents()
 {
+  nsRefPtr<nsAnimationManager> kungFuDeathGrip(this);
   EventArray events;
   mPendingEvents.SwapElements(events);
   for (uint32_t i = 0, i_end = events.Length(); i < i_end; ++i) {
     AnimationEventInfo &info = events[i];
     EventDispatcher::Dispatch(info.mElement, mPresContext, &info.mEvent);
 
     if (!mPresContext) {
       break;
diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -753,16 +753,17 @@ nsTransitionManager::FlushTransitions(Fl
       }
     }
   }
 
   if (didThrottle) {
     mPresContext->Document()->SetNeedStyleFlush();
   }
 
+  nsRefPtr<nsTransitionManager> kungFuDeathGrip(this);
   for (uint32_t i = 0, i_end = events.Length(); i < i_end; ++i) {
     TransitionEventInfo &info = events[i];
     EventDispatcher::Dispatch(info.mElement, mPresContext, &info.mEvent);
 
     if (!mPresContext) {
       break;
     }
   }