<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [WTF] Debug build fails due conflicting abort() method"
   href="https://bugs.webkit.org/show_bug.cgi?id=192491">192491</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[WTF] Debug build fails due conflicting abort() method
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Web Template Framework
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned@lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>aperez@igalia.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When building passing -DCMAKE_BUILD_TYPE=Debug:

 - The XMLHttpRequest class defines an ::abort() method (in Source/WebCore/xml/XMLHttpRequest.h)
 - The CRASH() and CRASH_UNDER_CONSTEXPR_CONTEXT macros (in Source/WTF/wtf/Assertions.h) call
   the abort() function, but inside the code for XMLHttpRequest that would implicitly call
   the method. Ugh.

Probably the best solution is to make the macros in Assertions.h use the
namespace (so they expand to std::abort), to avoid the method being picked
when expandin the macros.

Compilation error follows.

----

In file included from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:32,
                 from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:25,
                 from ../Source/WebCore/config.h:51,
                 from CSSValueKeywords.gperf:4,
                 from DerivedSources/WebCore/unified-sources/UnifiedSource1.cpp:1:
../Source/WebCore/xml/XMLHttpRequest.h: In static member function ‘static void* WebCore::XMLHttpRequest::operator new(size_t, NotNullTag, void*)’:
DerivedSources/ForwardingHeaders/wtf/Assertions.h:244:23: error: cannot call member function ‘void WebCore::XMLHttpRequest::abort()’ without object
 #define CRASH() abort()
                       ^
DerivedSources/ForwardingHeaders/wtf/Assertions.h:587:30: note: in expansion of macro ‘CRASH’
 #define CRASH_WITH_INFO(...) CRASH()
                              ^~~~~
DerivedSources/ForwardingHeaders/wtf/Assertions.h:323:9: note: in expansion of macro ‘CRASH_WITH_INFO’
         CRASH_WITH_INFO(__VA_ARGS__); \
         ^~~~~~~~~~~~~~~
DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:288:9: note: in expansion of macro ‘ASSERT’
         ASSERT(location); \
         ^~~~~~
DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:294:5: note: in expansion of macro ‘WTF_MAKE_FAST_ALLOCATED_IMPL’
     WTF_MAKE_FAST_ALLOCATED_IMPL \DerivedSources/ForwardingHeaders/wtf/Assertions.h:244:23: error: cannot call member function ‘void WebCore::XMLHttpRequest::abort()’ without object
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../Source/WebCore/xml/XMLHttpRequest.h:53:5: note: in expansion of macro ‘WTF_MAKE_FAST_ALLOCATED’
     WTF_MAKE_FAST_ALLOCATED;
     ^~~~~~~~~~~~~~~~~~~~~~~</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>