<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - bad_optional_access in RenderGrid::updateAutoMarginsInRowAxisIfNeeded"
   href="https://bugs.webkit.org/show_bug.cgi?id=232922#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - bad_optional_access in RenderGrid::updateAutoMarginsInRowAxisIfNeeded"
   href="https://bugs.webkit.org/show_bug.cgi?id=232922">bug 232922</a>
              from <span class="vcard"><a class="email" href="mailto:svillar@igalia.com" title="Sergio Villar Senin <svillar@igalia.com>"> <span class="fn">Sergio Villar Senin</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=443774&action=diff" name="attach_443774" title="Patch">attachment 443774</a> <a href="attachment.cgi?id=443774&action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=443774&action=review">https://bugs.webkit.org/attachment.cgi?id=443774&action=review</a>

<span class="quote">> Source/WebCore/ChangeLog:8
> +        Test: fast/css-grid-layout/grid-crash-update-auto-margins-row-axis.html</span >

Nit: the test line should be placed after the description paragraph.

<span class="quote">> Source/WebCore/ChangeLog:16
> +</span >

Nit extra line here.

<span class="quote">> Source/WebCore/rendering/RenderGrid.cpp:1226
> +    std::optional<LayoutUnit> availableWidth = child.overridingContainingBlockContentLogicalWidth();</span >

Although this seems correct I don't get why we have nullopt in the overriding size here. These two methods are called after calling updateGridAreaBreathLogicalSize() which always sets the overrides. That's why we were calling value() directly here without checking the presence of the value. Do you have more info about the exact conditions that trigger the bad access?

<span class="quote">> LayoutTests/fast/css-grid-layout/grid-crash-update-auto-margins-row-axis.html:3
> +<head></span >

Nit, you don't need neither <html> nor <head> nor <body></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>