summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/icecat-CVE-2016-1930-pt15.patch
blob: 9ebf18a5d331106757ab7cd3dff50b13697b59b7 (plain)
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
Copied from: https://hg.mozilla.org/releases/mozilla-esr38/rev/ee68c3dae5f6
Security advisory: https://www.mozilla.org/en-US/security/advisories/mfsa2016-01/
Mozilla Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1230483

# HG changeset patch
# User JW Wang <jwwang@mozilla.com>
# Date 1450698943 -28800
# Node ID ee68c3dae5f639fdd439f69ef2f724067fce0ea6
# Parent  762d015e1854c28c213293ac1e9b2ab51cf201f9
Bug 1230483 - Part 2 - LoadFromSourceChildren() should be queued at most once in an event cycle. r=roc, a=lizzard

diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4033,16 +4033,19 @@ void HTMLMediaElement::NotifyAddedSource
       mNetworkState == nsIDOMHTMLMediaElement::NETWORK_EMPTY)
   {
     QueueSelectResourceTask();
   }
 
   // A load was paused in the resource selection algorithm, waiting for
   // a new source child to be added, resume the resource selection algorithm.
   if (mLoadWaitStatus == WAITING_FOR_SOURCE) {
+    // Rest the flag so we don't queue multiple LoadFromSourceTask() when
+    // multiple <source> are attached in an event loop.
+    mLoadWaitStatus = NOT_WAITING;
     QueueLoadFromSourceTask();
   }
 }
 
 nsIContent* HTMLMediaElement::GetNextSource()
 {
   nsCOMPtr<nsIDOMNode> thisDomNode = do_QueryObject(this);