<?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>237948</bug_id>
          
          <creation_ts>2022-03-16 01:38:34 -0700</creation_ts>
          <short_desc>[GTK][WPE] Debug build assertion, TextureMapperPlatformLayerProxyGL asserts when going back in the minibrowser</short_desc>
          <delta_ts>2022-03-19 14:51:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>ANGLE</component>
          <version>WebKit Nightly Build</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=237949</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="Alejandro G. Castro">alex</reporter>
          <assigned_to name="Alejandro G. Castro">alex</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>clord</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>dino</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>kondapallykalyan</cc>
    
    <cc>luiz</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zdobersek</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1851686</commentid>
    <comment_count>0</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-16 01:38:34 -0700</bug_when>
    <thetext>We are not initializing m_compositorThread properly with the invalidation and the ThreadedCompositor is destroyed after a navigation, and when going back the browser asserts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851689</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-16 01:45:23 -0700</bug_when>
    <thetext>Added a new bug for a follow up patch to create a test for the ThreadedCompositor destroyed situation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851690</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-16 01:46:37 -0700</bug_when>
    <thetext>I forgot to say it is bug 237949.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851692</commentid>
    <comment_count>3</comment_count>
      <attachid>454811</attachid>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-16 01:47:27 -0700</bug_when>
    <thetext>Created attachment 454811
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851761</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-03-16 06:04:55 -0700</bug_when>
    <thetext>Committed r291342 (248481@main): &lt;https://commits.webkit.org/248481@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454811.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851762</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-03-16 06:05:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/90365573&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851802</commentid>
    <comment_count>6</comment_count>
      <attachid>454811</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-03-16 08:06:05 -0700</bug_when>
    <thetext>Comment on attachment 454811
Patch

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

&gt; Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:96
&gt; +#ifndef NDEBUG
&gt; +        m_compositorThread = nullptr;
&gt; +#endif

I&apos;m not sure if the #ifndef NDEBUG was a great idea... when I see this, I think &quot;why is this only needed with asserts enabled?&quot; Probably better to keep the debug/release codepaths similar rather than different.

Also: WebKit asserts can be enabled (ASSERT_ENABLED) even if libc asserts are not (NDEBUG).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851807</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2022-03-16 08:12:52 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; Comment on attachment 454811 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=454811&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:96
&gt; &gt; +#ifndef NDEBUG
&gt; &gt; +        m_compositorThread = nullptr;
&gt; &gt; +#endif
&gt; 
&gt; I&apos;m not sure if the #ifndef NDEBUG was a great idea... when I see this, I
&gt; think &quot;why is this only needed with asserts enabled?&quot; Probably better to
&gt; keep the debug/release codepaths similar rather than different.
&gt; 
&gt; Also: WebKit asserts can be enabled (ASSERT_ENABLED) even if libc asserts
&gt; are not (NDEBUG).

That&apos;s right, ASSERT_ENABLED should be used here and in other places where NDEBUG is used for m_compositorThread</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851839</commentid>
    <comment_count>8</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2022-03-16 08:59:25 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #6)
&gt; Comment on attachment 454811 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=454811&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxyGL.cpp:96
&gt; &gt; +#ifndef NDEBUG
&gt; &gt; +        m_compositorThread = nullptr;
&gt; &gt; +#endif
&gt; 
&gt; I&apos;m not sure if the #ifndef NDEBUG was a great idea... when I see this, I
&gt; think &quot;why is this only needed with asserts enabled?&quot; Probably better to
&gt; keep the debug/release codepaths similar rather than different.
&gt; 

Basically all the file is using the variable with NDEBUG, if we don&apos;t use it the variable is not even defined, there is no change in the behaviour. It would be great if you can review this and the other proxies and propose a patch, I think the dmabuf is using a similar setup.

&gt; Also: WebKit asserts can be enabled (ASSERT_ENABLED) even if libc asserts
&gt; are not (NDEBUG).

Urg, in that case even the compilation is broken because the variable is defined in the headers inside NDEBUG guards. A patch for that kind of code is really welcome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1851848</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-03-16 09:09:04 -0700</bug_when>
    <thetext>(In reply to Alejandro G. Castro from comment #8)
&gt; Basically all the file is using the variable with NDEBUG, if we don&apos;t use it
&gt; the variable is not even defined, there is no change in the behaviour.

Oh OK, of course that&apos;s fine then.

Should probably still use ASSERT_ENABLED rather than NDEBUG, but I see we have many other places in WebKit using NDEBUG. I suppose whoever next tries to enable assertions in release builds will wind up figuring this out....</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>454811</attachid>
            <date>2022-03-16 01:47:27 -0700</date>
            <delta_ts>2022-03-16 06:04:58 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-237948-20220316094725.patch</filename>
            <type>text/plain</type>
            <size>2012</size>
            <attacher name="Alejandro G. Castro">alex</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjkxMzExCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNDc5M2M5NDg4ZTRiO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