Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 72b85b2256369ae792d9ded7ada00bdee85f53dc
      
https://github.com/WebKit/WebKit/commit/72b85b2256369ae792d9ded7ada00bdee85f53dc
  Author: David Kilzer <ddkil...@apple.com>
  Date:   2025-07-30 (Wed, 30 Jul 2025)

  Changed paths:
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp

  Log Message:
  -----------
  Use type-aware memory allocator for struct XMLMalloc in 
XMLDocumentParserLibxml2.cpp
<https://bugs.webkit.org/show_bug.cgi?id=296245>
<rdar://155846853>

Reviewed by Alex Christensen.

* Source/WTF/wtf/PlatformHave.h:
(HAVE_TYPE_AWARE_MALLOC): Add.
- Define HAVE(TYPE_AWARE_MALLOC) macro when the feature is available.
(WTF_TYPE_AWARE_MALLOC_FUNCTION): Add.
- Define attribute macro for use with HAVE(TYPE_AWARE_MALLOC).

* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::xmlMallocHelper): Add.
- Define overloaded method for use with HAVE(TYPE_AWARE_MALLOC).
(WebCore::xmlFreeHelper):
- Always call free() instead of xmlFree() when a type-aware allocator is
  used.  Most ports using libxml2 do not redefine xmlFree() to free(),
  so this is necessary for consistency.
(WebCore::XMLMalloc::malloc):
- Add WTF_TYPE_AWARE_MALLOC_FUNCTION() attribute to call overloaded
  xmlMallocHelper() when using a type-aware allocator.

Canonical link: https://commits.webkit.org/298050@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to