<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION (r293933): [ iOS Debug ][ macOS Debug wk2 ] ASSERTION FAILED: m_requestCount > -1"
   href="https://bugs.webkit.org/show_bug.cgi?id=240325#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION (r293933): [ iOS Debug ][ macOS Debug wk2 ] ASSERTION FAILED: m_requestCount > -1"
   href="https://bugs.webkit.org/show_bug.cgi?id=240325">bug 240325</a>
              from <span class="vcard"><a class="email" href="mailto:simon.fraser@apple.com" title="Simon Fraser (smfr) <simon.fraser@apple.com>"> <span class="fn">Simon Fraser (smfr)</span></a>
</span></b>
        <pre>Looks like an interaction with preloading:

20:41:48.278 491 worker/0   ImageLoader::updateFromElement: request <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a> - setting ignore to true for lazy loading
20:41:48.278 491 worker/0    RequestCountTracker: loader 0x4d40840c0 resource 0x4d4088e80 <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a>
20:41:48.278 491 worker/0   CachedResourceLoader 0x4d40840c0 incrementRequestCount for resource <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a> ignore: 1
20:41:48.278 491 worker/0   CachedResourceLoader 0x4d4084640 requestResource <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a> - setting ignore to false for preload
20:41:48.278 491 worker/0   CachedResourceLoader 0x4d4084640 incrementRequestCount for resource <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a> ignore: 0
20:41:48.279 491 worker/0   ~RequestCountTracker: loader 0x4d40840c0 resource 0x4d4088e80 <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a>
20:41:48.279 491 worker/0   CachedResourceLoader 0x4d40840c0 decrementRequestCount for resource <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a> ignore: 0
20:41:48.279 491 worker/0   CachedResourceLoader 0x4d40840c0 decrementRequestCount: bad request count for resource <a href="http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911">http://localhost:8800/html/semantics/embedded-content/the-img-element/resources/image.png?image-loading-lazy-in-viewport-0.26373450708710056-1655178032911</a>

Looks like we have two separate CachedResourceLoader for the same CachedResource (weird). Preloading toggles m_ignoreForRequestCount on the CachedResource, which causes an extra decrement of m_requestCount on one of the CachedResourceLoaders.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>