<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>186971</bug_id>
          
          <creation_ts>2018-06-23 07:13:09 -0700</creation_ts>
          <short_desc>[GStreamer] Media player does not properly inhibit, uninhibit sleep</short_desc>
          <delta_ts>2020-11-30 06:52:54 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=219010</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=219353</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=219354</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=219355</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bastien Nocera">bugzilla</reporter>
          <assigned_to name="Xabier Rodríguez Calvar">calvaris</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>cgarcia</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>glenn</cc>
    
    <cc>gustavo</cc>
    
    <cc>jer.noble</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>menard</cc>
    
    <cc>pgriffis</cc>
    
    <cc>philipj</cc>
    
    <cc>pnormand</cc>
    
    <cc>sergio</cc>
    
    <cc>vjaquez</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1435841</commentid>
    <comment_count>0</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2018-06-23 07:13:09 -0700</bug_when>
    <thetext>webkit2gtk3-2.20.2-1.fc28.x86_64

1. Open a page like https://www.twitch.tv/videos/276566160
2. Press play, idle is inhibited
3. Press pause, idle is still inhibited
4. Open a new tab, idle stop being inhibited

You can check the inhibited actions with:
gdbus introspect --session --dest org.gnome.SessionManager --object-path /org/gnome/SessionManager | grep InhibitedActions

After 3, idle should be uninhibited.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435845</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-23 07:28:17 -0700</bug_when>
    <thetext>I see at the very top of HTMLMediaElement::shouldDisableSleep:

    if (!m_player || m_player-&gt;paused() || loop())
        return SleepType::None;

which should turn off the SleepDisabler. So some debugging will be required to investigate why this code is not working as intended.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1436086</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-06-25 09:38:06 -0700</bug_when>
    <thetext>The problem is two-fold:

- the visibility of the media element changed but HTMLMediaElement::shouldDisableSleep() returns too early the None result, before checking the m_elementIsHidden variable.

- Even if the m_elementIsHidden test is moved up, a System sleep disabler will be created, but our SleepDisablerGlib doesn&apos;t support that type.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1436139</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-25 11:00:12 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #2)
&gt; - Even if the m_elementIsHidden test is moved up, a System sleep disabler
&gt; will be created, but our SleepDisablerGlib doesn&apos;t support that type.

Umm...

I see I wrote this comment when writing SleepDisablerGlib:

    // We don&apos;t support suspend (&quot;System&quot;) inhibitors, only idle inhibitors.
    // To get suspend inhibitors, we&apos;d need to use the fancy GNOME
    // SessionManager API, which requires registering as a client application,
    // which is not practical from the web process. Secondly, because the only
    // current use of a suspend inhibitor in WebKit,
    // HTMLMediaElement::shouldDisableSleep, is suspicious. There&apos;s really no
    // valid reason for WebKit to ever block suspend, only idle.

There are three things wrong with this comment:

 * Nowadays, GNOME suspends the computer automatically on inactivity, and we actually do want to prevent that.
 * Inhibiting idle does affect the autosuspend countdown. So the current code should prevent automatic suspend, just not manual suspend. (I think I stand by my comment that we do not want to inhibit normal suspend, since that would just be annoying.)
 * I don&apos;t know why I thought HTMLMediaElement::shouldDisableSleep was suspicious.

Anyway, I guess the behavior we want is to ignore the Type argument and just always inhibit idle. That is, treat type=System the same way we current treat type=Display. I couldn&apos;t decide which to do when I wrote this code, but in retrospect that would have been a better option.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1436184</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-06-25 12:36:11 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #2)
&gt; The problem is two-fold:
&gt; 
&gt; - the visibility of the media element changed but
&gt; HTMLMediaElement::shouldDisableSleep() returns too early the None result,
&gt; before checking the m_elementIsHidden variable.
&gt; 

Eric, would it be acceptable to move the the m_elementIsHidden test up in HTMLMediaElement::shouldDisableSleep() ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1436203</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2018-06-25 13:15:41 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #4)
&gt; (In reply to Philippe Normand from comment #2)
&gt; &gt; The problem is two-fold:
&gt; &gt; 
&gt; &gt; - the visibility of the media element changed but
&gt; &gt; HTMLMediaElement::shouldDisableSleep() returns too early the None result,
&gt; &gt; before checking the m_elementIsHidden variable.
&gt; &gt; 
&gt; 
&gt; Eric, would it be acceptable to move the the m_elementIsHidden test up in
&gt; HTMLMediaElement::shouldDisableSleep() ?

We don&apos;t want to enable sleep for a &quot;playing&quot; that doesn&apos;t have audio and video, so where would we move the m_elementIsHidden test?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1466041</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-10-03 06:51:27 -0700</bug_when>
    <thetext>I started debugging this again.

In shouldDisableSleep(), both hasVideo() and hasAudio() calls return false because a null MediaPlayerPrivate has been created meanwhile. I don&apos;t know why yet... So this shouldn&apos;t happen, the video is paused and should have both audio and video... So shouldBeAbleToSleep becomes true there, instead of false.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1466042</commentid>
    <comment_count>7</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2018-10-03 06:53:23 -0700</bug_when>
    <thetext>I meant, So shouldBeAbleToSleep becomes false there, instead of true. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1504866</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-02-11 08:08:15 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #3)
&gt; There are three things wrong with this comment:

Split all of this out to bug #194500. Leaving this bug for the HTMLMediaElement problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1547437</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-24 11:38:13 -0700</bug_when>
    <thetext>Well this bug as reported no longer occurs, because nowadays we never disable sleep. In bug #192530, I found HTMLMediaElement::updateSleepDisabling is not being called when paused/unpaused.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1596708</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-12-08 10:20:03 -0800</bug_when>
    <thetext>This continues to be pretty annoying.

Conclusion from bug #194500 is that SleepDisabler will inhibit idle now, as expected. So that&apos;s solved.

Conclusion from bug #192530: &quot;Now, HTMLMediaElement::updateSleepDisabling is not being called when paused/unpaused, which is bad, but I believe we have other bug reports for that.&quot; This should be solved here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611055</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-01-25 09:34:49 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #6)
&gt; I started debugging this again.
&gt; 
&gt; In shouldDisableSleep(), both hasVideo() and hasAudio() calls return false
&gt; because a null MediaPlayerPrivate has been created meanwhile. I don&apos;t know
&gt; why yet... So this shouldn&apos;t happen, the video is paused and should have
&gt; both audio and video... So shouldBeAbleToSleep becomes true there, instead
&gt; of false.

I wasted a bunch of time debugging this today because I didn&apos;t read your comment. Conclusion: this is exactly what&apos;s still happening. When starting a YouTube video, m_mediaPlayer is either valid and paused() (during a brief window before playback begins), or else it&apos;s NULL (it seems to always be NULL during media playback). So next question to debug is: why is media playing when MediaPlayer is NULL?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1650066</commentid>
    <comment_count>12</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-05-07 06:35:11 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #11)
&gt; So next question to debug is: why is media playing when MediaPlayer is NULL?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1705254</commentid>
    <comment_count>13</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2020-11-06 08:32:49 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #12)
&gt; (In reply to Michael Catanzaro from comment #11)
&gt; &gt; So next question to debug is: why is media playing when MediaPlayer is NULL?

The media player is null in some other HTMLMediaElement, not in the one taking care of the main playback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1706040</commentid>
    <comment_count>14</comment_count>
      <attachid>413683</attachid>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2020-11-10 03:29:30 -0800</bug_when>
    <thetext>Created attachment 413683
Patch

We were not updating the playback state in the MSE player and therefore, when getting to PLAYING the HTMLMediaElement didn&apos;t know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1706099</commentid>
    <comment_count>15</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-10 09:05:24 -0800</bug_when>
    <thetext>I tested this today. I see an inhibitor is now acquired when I begin playing a YouTube video, which is an improvement. However, the inhibitor is not released when I stop the video. Debug patch:

diff --git a/Source/WebCore/PAL/pal/system/glib/SleepDisablerGLib.cpp b/Source/WebCore/PAL/pal/system/glib/SleepDisabl
erGLib.cpp
index 6f922e118afd..2fc2d15487a4 100644
--- a/Source/WebCore/PAL/pal/system/glib/SleepDisablerGLib.cpp
+++ b/Source/WebCore/PAL/pal/system/glib/SleepDisablerGLib.cpp
@@ -104,6 +104,7 @@ SleepDisablerGLib::~SleepDisablerGLib()
 
 void SleepDisablerGLib::acquireInhibitor()
 {
+WTFLogAlways(&quot;%s this=%p&quot;, __FUNCTION__, this);
     if (m_screenSaverProxy) {
         ASSERT(!m_inhibitPortalProxy);
         acquireInhibitorViaScreenSaverProxy();
@@ -158,6 +159,7 @@ void SleepDisablerGLib::acquireInhibitorViaInhibitPortalProxy()
 
 void SleepDisablerGLib::releaseInhibitor()
 {
+WTFLogAlways(&quot;%s this=%p&quot;, __FUNCTION__, this);
     if (m_screenSaverProxy) {
         ASSERT(!m_inhibitPortalProxy);
         releaseInhibitorViaScreenSaverProxy();</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1707976</commentid>
    <comment_count>16</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-16 13:27:31 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #15)
&gt; I tested this today. I see an inhibitor is now acquired when I begin playing
&gt; a YouTube video, which is an improvement. However, the inhibitor is not
&gt; released when I stop the video.

The inhibitor is also not released when I close the browser while a video is playing. I guess the SleepDisabler is leaked, which I presume will cause the inhibit to last forever? Not sure.

I&apos;ve also noticed the inhibitor is sometimes not acquired when starting a video, but I haven&apos;t figured out how to reproduce that.

Finally, Calvaris noticed that SleepDisabler doesn&apos;t actually work. There are two problems: first, the ScreenSaver D-Bus API is not available inside the sandbox. (OK.) Second, the portal API fails because we try using g_get_prgname() instead of a valid app ID. These are problems in SleepDisabler itself, which I will address in a forthcoming bug report. Let&apos;s use this bug only for the original problem in HTMLMediaElement that Calvaris has investigated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1708000</commentid>
    <comment_count>17</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-16 14:29:57 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #16)
&gt; I&apos;ve also noticed the inhibitor is sometimes not acquired when starting a
&gt; video, but I haven&apos;t figured out how to reproduce that.

This often -- but not always -- happens when starting a video by clicking the &quot;Skip Ads&quot; button.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1708015</commentid>
    <comment_count>18</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-16 15:09:21 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #17)
&gt; This often -- but not always -- happens when starting a video by clicking
&gt; the &quot;Skip Ads&quot; button.

Hm, actually it seems like it always happens. So summary of remaining media-level problems:

 * SleepDisabler not created when &quot;Skip Ads&quot; is used to start the video
 * SleepDisabler not destroyed when stopping the video
 * SleepDisabler leaked when closing tab (though it is destroyed when refreshing the tab!)

(In reply to Michael Catanzaro from comment #16)
&gt; Finally, Calvaris noticed that SleepDisabler doesn&apos;t actually work. There
&gt; are two problems: first, the ScreenSaver D-Bus API is not available inside
&gt; the sandbox. (OK.) Second, the portal API fails because we try using
&gt; g_get_prgname() instead of a valid app ID.

I&apos;m continuing to investigate these.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1708036</commentid>
    <comment_count>19</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-16 16:17:51 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #16)
&gt; Second, the portal API fails because we try using
&gt; g_get_prgname() instead of a valid app ID.

That&apos;s not what&apos;s happening. We only pass our own prgname to the ScreenSaver D-Bus API, which is blocked in the sandbox because it&apos;s only for use by trusted applications. We don&apos;t pass our own app ID to the portal API, because we are sandboxed and not trusted to not lie about it. We can continue this thread in bug #219010.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1708152</commentid>
    <comment_count>20</comment_count>
    <who name="Bastien Nocera">bugzilla</who>
    <bug_when>2020-11-17 01:31:03 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #19)
&gt; (In reply to Michael Catanzaro from comment #16)
&gt; &gt; Second, the portal API fails because we try using
&gt; &gt; g_get_prgname() instead of a valid app ID.
&gt; 
&gt; That&apos;s not what&apos;s happening. We only pass our own prgname to the ScreenSaver
&gt; D-Bus API, which is blocked in the sandbox because it&apos;s only for use by
&gt; trusted applications. We don&apos;t pass our own app ID to the portal API,
&gt; because we are sandboxed and not trusted to not lie about it. We can
&gt; continue this thread in bug #219010.

The org.freedesktop.ScreenSaver API is implemented in gnome-settings-daemon, and doesn&apos;t filter clients:
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/blob/master/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
https://github.com/WebKit/webkit/blob/master/Source/WebCore/PAL/pal/system/glib/SleepDisablerGLib.cpp#L54</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1709999</commentid>
    <comment_count>21</comment_count>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2020-11-24 07:17:00 -0800</bug_when>
    <thetext>The playback part is done. I think this can/should land regardless the problem with the flatpak. If there&apos;s something else I can help with, I guess another bug can be filed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710006</commentid>
    <comment_count>22</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-24 07:46:44 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #18)
&gt; (In reply to Michael Catanzaro from comment #17)
&gt; &gt; This often -- but not always -- happens when starting a video by clicking
&gt; &gt; the &quot;Skip Ads&quot; button.
&gt; 
&gt; Hm, actually it seems like it always happens. So summary of remaining
&gt; media-level problems:
&gt; 
&gt;  * SleepDisabler not created when &quot;Skip Ads&quot; is used to start the video
&gt;  * SleepDisabler not destroyed when stopping the video
&gt;  * SleepDisabler leaked when closing tab (though it is destroyed when
&gt; refreshing the tab!)

These problems are not bugs in SleepDisabler itself. At least the first two seem very likely to be media playback bugs, yes? I suppose the third one could be caused by something else leaking the entire MediaPlayer?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710420</commentid>
    <comment_count>23</comment_count>
      <attachid>413683</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-28 06:20:48 -0800</bug_when>
    <thetext>Comment on attachment 413683
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=413683&amp;action=review

&gt; Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:588
&gt; +        // Emit play state change notification only when going to PLAYING so that
&gt; +        // the media element gets a chance to enable its page sleep disabler.
&gt; +        // Emitting this notification in more cases triggers unwanted code paths
&gt; +        // and test timeouts.

But is this really correct? What is the plan to ensure the SleepDisabler gets released when playback stops?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710540</commentid>
    <comment_count>24</comment_count>
      <attachid>413683</attachid>
    <who name="Xabier Rodríguez Calvar">calvaris</who>
    <bug_when>2020-11-30 01:27:36 -0800</bug_when>
    <thetext>Comment on attachment 413683
Patch

(In reply to Michael Catanzaro from comment #23)
&gt; Comment on attachment 413683 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=413683&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:588
&gt; &gt; +        // Emit play state change notification only when going to PLAYING so that
&gt; &gt; +        // the media element gets a chance to enable its page sleep disabler.
&gt; &gt; +        // Emitting this notification in more cases triggers unwanted code paths
&gt; &gt; +        // and test timeouts.
&gt; 
&gt; But is this really correct? What is the plan to ensure the SleepDisabler
&gt; gets released when playback stops?

Once the sandboxing issues are fixed, you can test it and file a new bug if there is such a problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710542</commentid>
    <comment_count>25</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2020-11-30 01:30:08 -0800</bug_when>
    <thetext>Committed r270235: &lt;https://trac.webkit.org/changeset/270235&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413683.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710544</commentid>
    <comment_count>26</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-11-30 01:31:30 -0800</bug_when>
    <thetext>&lt;rdar://problem/71798034&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710584</commentid>
    <comment_count>27</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-30 06:43:02 -0800</bug_when>
    <thetext>&gt;  * SleepDisabler not created when &quot;Skip Ads&quot; is used to start the video
&gt;  * SleepDisabler not destroyed when stopping the video
&gt;  * SleepDisabler leaked when closing tab (though it is destroyed when
&gt; refreshing the tab!)

Issuse with SleepDisabler creation/destruction are not related to the sandboxing issues, so I&apos;ll report new bugs now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1710593</commentid>
    <comment_count>28</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2020-11-30 06:52:19 -0800</bug_when>
    <thetext>Reported: bug #219353, bug #219354, bug #219355.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>413683</attachid>
            <date>2020-11-10 03:29:30 -0800</date>
            <delta_ts>2020-11-30 01:30:09 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-186971-20201110122929.patch</filename>
            <type>text/plain</type>
            <size>2842</size>
            <attacher name="Xabier Rodríguez Calvar">calvaris</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjY5NTY3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMjQyNzM3NDVlZDFjYzEz
NjhiMDg2YWUwNDUwNzFlNGY0YzQwOGM2MC4uZDEzNjdmYWRiNTNhYmMyODY3OWE5OGJlMTFmMGM2
MTc4MTQxZDVkZCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE1IEBACisyMDIwLTExLTEwICBYYWJp
ZXIgUm9kcmlndWV6IENhbHZhciAgPGNhbHZhcmlzQGlnYWxpYS5jb20+CisKKyAgICAgICAgW0dT
dHJlYW1lcl0gTWVkaWEgcGxheWVyIGRvZXMgbm90IHByb3Blcmx5IGluaGliaXQsIHVuaW5oaWJp
dCBzbGVlcAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
MTg2OTcxCisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAg
KiBwbGF0Zm9ybS9ncmFwaGljcy9nc3RyZWFtZXIvbXNlL01lZGlhUGxheWVyUHJpdmF0ZUdTdHJl
YW1lck1TRS5jcHA6CisgICAgICAgIChXZWJDb3JlOjpNZWRpYVBsYXllclByaXZhdGVHU3RyZWFt
ZXJNU0U6OnVwZGF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ZSBtZWRpYSBlbGVtZW50IGdldHMg
YSBjaGFuY2UgdG8gZW5hYmxlIGl0cyBwYWdlIHNsZWVwIGRpc2FibGVyLgorICAgICAgICAvLyBF
bWl0dGluZyB0aGlzIG5vdGlmaWNhdGlvbiBpbiBtb3JlIGNhc2VzIHRyaWdnZXJzIHVud2FudGVk
IGNvZGUgcGF0aHMKKyAgICAgICAgLy8gYW5kIHRlc3QgdGltZW91dHMuCisgICAgICAgIGlmIChz
dGF0ZVJlYWxseUNoYW5nZWQgJiYgKG1fb2xkU3RhdGUgIT0gbV9jdXJyZW50U3RhdGUpICYmICht
X29sZFN0YXRlID09IEdTVF9TVEFURV9QQVVTRUQgJiYgbV9jdXJyZW50U3RhdGUgPT0gR1NUX1NU
QVRFX1BMQVlJTkcpKSB7CisgICAgICAgICAgICBHU1RfSU5GT19PQkpFQ1QocGlwZWxpbmUoKSwg
IlBsYXliYWNrIHN0YXRlIGNoYW5nZWQgZnJvbSAlcyB0byAlcy4gTm90aWZ5aW5nIHRoZSBtZWRp
YSBwbGF5ZXIgY2xpZW50IiwgZ3N0X2VsZW1lbnRfc3RhdGVfZ2V0X25hbWUobV9vbGRTdGF0ZSks
IGdzdF9lbGVtZW50X3N0YXRlX2dldF9uYW1lKG1fY3VycmVudFN0YXRlKSk7CisgICAgICAgICAg
ICBzaG91bGRVcGRhdGVQbGF5YmFja1N0YXRlID0gdHJ1ZTsKKyAgICAgICAgfQorCiAgICAgICAg
IGJyZWFrOwogICAgIH0KICAgICBjYXNlIEdTVF9TVEFURV9DSEFOR0VfQVNZTkM6Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>