Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 49e16e9ddcee72f8f19370735909ca1a677a8b14
https://github.com/WebKit/WebKit/commit/49e16e9ddcee72f8f19370735909ca1a677a8b14
Author: David Kilzer <[email protected]>
Date: 2024-04-24 (Wed, 24 Apr 2024)
Changed paths:
M Source/WebCore/xml/XSLTProcessorLibxslt.cpp
M Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
M Source/WebCore/xml/parser/XMLDocumentParserScope.cpp
M Source/WebCore/xml/parser/XMLDocumentParserScope.h
Log Message:
-----------
Use smart pointers with WebCore::CachedResourceLoader in libxml2/libxslt code
https://bugs.webkit.org/show_bug.cgi?id=273204
<rdar://126997686>
Reviewed by Chris Dumez and Alex Christensen.
Deploy smart pointers for CachedResourceLoader objects used in
libxml2/libxslt integration code. Use WeakPtr<> for storing temporary
references. Use RefPtr<> when used multiple times in a method.
Also change 0 to nullptr functions that were modified.
* Source/WebCore/xml/XSLTProcessorLibxslt.cpp:
(WebCore::globalCachedResourceLoader): Add.
(WebCore::docLoaderFunc):
- Add early return when there is no data to parse. This also simplifies
the arguments to xmlReadMemory().
(WebCore::setXSLTLoadCallBack):
(WebCore::XSLTProcessor::transformToString):
* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::matchFunc):
(WebCore::shouldAllowExternalLoad):
(WebCore::openFunc):
- Add early return when
XMLDocumentParserScope::currentCachedResourceLoader() is nullptr.
- Store Document in a RefPtr.
(WebCore::XMLDocumentParser::doEnd):
* Source/WebCore/xml/parser/XMLDocumentParserScope.cpp:
(WebCore::XMLDocumentParserScope::currentCachedResourceLoader): Add.
(WebCore::XMLDocumentParserScope::XMLDocumentParserScope):
(WebCore::XMLDocumentParserScope::~XMLDocumentParserScope):
* Source/WebCore/xml/parser/XMLDocumentParserScope.h:
- Fix old-style indentation of class declaration.
- Delete unused default constructor.
- Provide default initializers for instance variables.
Canonical link: https://commits.webkit.org/277956@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes