<?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>143334</bug_id>
          
          <creation_ts>2015-04-02 06:42:31 -0700</creation_ts>
          <short_desc>Remove unnecessary ASSERT from XMLDocumentParser::notifyFinished()</short_desc>
          <delta_ts>2022-08-14 13:49:20 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gabor Rapcsanyi">rgabor</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>darin</cc>
    
    <cc>koivisto</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1082217</commentid>
    <comment_count>0</comment_count>
    <who name="Gabor Rapcsanyi">rgabor</who>
    <bug_when>2015-04-02 06:42:31 -0700</bug_when>
    <thetext>Remove the ASSERT(m_pendingScript-&gt;accessCount() &gt; 0) because if the MemoryCache is disabled then we never icrease the accessCount.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082218</commentid>
    <comment_count>1</comment_count>
      <attachid>249976</attachid>
    <who name="Gabor Rapcsanyi">rgabor</who>
    <bug_when>2015-04-02 06:50:55 -0700</bug_when>
    <thetext>Created attachment 249976
proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082458</commentid>
    <comment_count>2</comment_count>
      <attachid>249976</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-04-02 22:15:53 -0700</bug_when>
    <thetext>Comment on attachment 249976
proposed patch

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

&gt; Source/WebCore/ChangeLog:9
&gt; +        Remove the ASSERT(m_pendingScript-&gt;accessCount() &gt; 0) because if the MemoryCache is disabled
&gt; +        then we never icrease the accessCount.

Is it unnecessary, or incorrect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1082503</commentid>
    <comment_count>3</comment_count>
    <who name="Gabor Rapcsanyi">rgabor</who>
    <bug_when>2015-04-03 03:46:21 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 249976 [details]
&gt; proposed patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=249976&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/ChangeLog:9
&gt; &gt; +        Remove the ASSERT(m_pendingScript-&gt;accessCount() &gt; 0) because if the MemoryCache is disabled
&gt; &gt; +        then we never icrease the accessCount.
&gt; 
&gt; Is it unnecessary, or incorrect?

Well, maybe incorrect is a better word for it. I&apos;m not sure whether we should change the assert or just remove it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1086081</commentid>
    <comment_count>4</comment_count>
      <attachid>249976</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-04-16 14:53:27 -0700</bug_when>
    <thetext>Comment on attachment 249976
proposed patch

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

Couldn&apos;t we have a layout test for this by exposing MemoryCache::setDisabled() via Internals?

&gt; Source/WebCore/xml/parser/XMLDocumentParser.cpp:-226
&gt; -    ASSERT(m_pendingScript-&gt;accessCount() &gt; 0);

Maybe ASSERT(m_pendingScript-&gt;accessCount() &gt; 0 || MemoryCache::singleton().disabled()); then?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300813</commentid>
    <comment_count>5</comment_count>
      <attachid>249976</attachid>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2017-04-24 19:06:51 -0700</bug_when>
    <thetext>Comment on attachment 249976
proposed patch

This patch has been pending review since 2015 with no recent activity.
It seems unlikely that it would even still apply to trunk in its current form.

Clearing from the review queue.

Feel free to update and resubmit if the patch is still relevant.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1888901</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-04 10:28:51 -0700</bug_when>
    <thetext>&gt;&gt; ap@webkit.org - is this required?

https://github.com/WebKit/WebKit/blob/1ffe018f5d5cd17e88f1a34ee7a62d47290ed07d/Source/WebCore/xml/parser/XMLDocumentParser.cpp#L227

Seems like m_pendingScript is now changed to nullptr and it does not asset. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1891254</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-08-14 13:49:20 -0700</bug_when>
    <thetext>There is no such assertion in XMLDocumentParser::notifyFinished any more.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>249976</attachid>
            <date>2015-04-02 06:50:55 -0700</date>
            <delta_ts>2017-04-24 19:07:58 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>assert.patch</filename>
            <type>text/plain</type>
            <size>1435</size>
            <attacher name="Gabor Rapcsanyi">rgabor</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW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NvdXJjZS9XZWJDb3JlL3htbC9wYXJzZXIvWE1MRG9jdW1lbnRQYXJzZXIuY3Bw
CmluZGV4IGY1NWE2MTUuLmQ0OWM0YzIgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJDb3JlL3htbC9w
YXJzZXIvWE1MRG9jdW1lbnRQYXJzZXIuY3BwCisrKyBiL1NvdXJjZS9XZWJDb3JlL3htbC9wYXJz
ZXIvWE1MRG9jdW1lbnRQYXJzZXIuY3BwCkBAIC0yMjMsNyArMjIzLDYgQEAgdm9pZCBYTUxEb2N1
bWVudFBhcnNlcjo6aW5zZXJ0RXJyb3JNZXNzYWdlQmxvY2soKQogdm9pZCBYTUxEb2N1bWVudFBh
cnNlcjo6bm90aWZ5RmluaXNoZWQoQ2FjaGVkUmVzb3VyY2UqIHVudXNlZFJlc291cmNlKQogewog
ICAgIEFTU0VSVF9VTlVTRUQodW51c2VkUmVzb3VyY2UsIHVudXNlZFJlc291cmNlID09IG1fcGVu
ZGluZ1NjcmlwdCk7Ci0gICAgQVNTRVJUKG1fcGVuZGluZ1NjcmlwdC0+YWNjZXNzQ291bnQoKSA+
IDApOwogCiAgICAgU2NyaXB0U291cmNlQ29kZSBzb3VyY2VDb2RlKG1fcGVuZGluZ1NjcmlwdC5n
ZXQoKSk7CiAgICAgYm9vbCBlcnJvck9jY3VycmVkID0gbV9wZW5kaW5nU2NyaXB0LT5lcnJvck9j
Y3VycmVkKCk7Cg==
</data>
<flag name="review"
          id="274811"
          type_id="1"
          status="-"
          setter="beidson"
    />
    <flag name="commit-queue"
          id="274812"
          type_id="3"
          status="-"
          setter="beidson"
    />
          </attachment>
      

    </bug>

</bugzilla>