Skip to content

Commit f5f0870

Browse files
[GLIB] WebKit doesn't build with -DENABLE_MALLOC_HEAP_BREAKDOWN=ON
https://bugs.webkit.org/show_bug.cgi?id=298223 Reviewed by Michael Catanzaro. There were a few issues here: * Commit 37d4a68 introduced a new argument to the WTF_DEPRECATED_MAKE_STRUCT_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER() macro, but didn't update all places accordingly * There's a conflicting symbol with the ResourceLoader expansion, so rename it. * The heap identifier in StyleInterpolationWrapperBase.h was misnamed, probably a copy-paste mistake. * In FastMalloc.{cpp,h}, relevant parts of the code were compiled out due to not having a BENABLE(MALLOC_HEAP_BREAKDOWN) check. Add them. * Source/WebCore/Modules/fetch/FetchLoader.cpp: * Source/WebCore/Modules/fetch/FetchLoader.h: * Source/WebCore/Modules/notifications/NotificationResourcesLoader.cpp: * Source/WebCore/Modules/notifications/NotificationResourcesLoader.h: * Source/WebCore/css/CSSSelector.h: * Source/WebCore/css/parser/CSSTokenizer.cpp: * Source/WebCore/css/parser/CSSTokenizerInputStream.cpp: * Source/WebCore/fileapi/FileReaderLoader.cpp: * Source/WebCore/fileapi/FileReaderLoader.h: * Source/WebCore/loader/LoaderMalloc.cpp: * Source/WebCore/loader/ResourceLoader.cpp: * Source/WebCore/loader/ResourceLoader.h: * Source/WebCore/page/PerformanceEntry.cpp: * Source/WebCore/style/StyleInterpolation.cpp: * Source/WebCore/style/StyleInterpolationWrapperBase.h: * Source/WebCore/style/StyleTreeResolver.h: * Source/bmalloc/bmalloc/SystemHeap.cpp: * Source/bmalloc/bmalloc/SystemHeap.h: Canonical link: https://commits.webkit.org/299555@main
1 parent 5264768 commit f5f0870

18 files changed

Lines changed: 25 additions & 10 deletions

‎Source/WebCore/Modules/fetch/FetchLoader.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
namespace WebCore {
5050

5151
WTF_MAKE_TZONE_ALLOCATED_IMPL(FetchLoaderClient);
52+
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(FetchLoader);
5253

5354
void FetchLoader::start(ScriptExecutionContext& context, const Blob& blob)
5455
{

‎Source/WebCore/Modules/fetch/FetchLoader.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class FetchRequest;
4343
class ScriptExecutionContext;
4444
class FragmentedSharedBuffer;
4545

46+
DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(FetchLoader);
4647
class WEBCORE_EXPORT FetchLoader final : public RefCounted<FetchLoader>, public ThreadableLoaderClient {
4748
WTF_DEPRECATED_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(FetchLoader, FetchLoader);
4849
WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(FetchLoader);

‎Source/WebCore/Modules/notifications/NotificationResourcesLoader.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ namespace WebCore {
4444
// https://notifications.spec.whatwg.org/#resources
4545

4646
WTF_MAKE_TZONE_ALLOCATED_IMPL(NotificationResourcesLoader);
47+
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(ResourceLoader);
4748

4849
NotificationResourcesLoader::NotificationResourcesLoader(Notification& notification)
4950
: m_notification(notification)

‎Source/WebCore/Modules/notifications/NotificationResourcesLoader.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class NotificationResources;
4242
class ResourceError;
4343
class ResourceResponse;
4444

45+
DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(ResourceLoader);
4546
class NotificationResourcesLoader {
4647
WTF_MAKE_TZONE_ALLOCATED(NotificationResourcesLoader);
4748
public:

‎Source/WebCore/css/CSSSelector.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
236236
CSSSelector(CSSSelector&&) = delete;
237237

238238
struct RareData : public RefCounted<RareData> {
239-
WTF_DEPRECATED_MAKE_STRUCT_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(CSSSelectorRareData, RareData);
239+
WTF_DEPRECATED_MAKE_STRUCT_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(CSSSelectorRareData, CSSSelectorRareData);
240240
static Ref<RareData> create(AtomString);
241241
WEBCORE_EXPORT ~RareData();
242242

‎Source/WebCore/css/parser/CSSTokenizer.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "CSSParserObserverWrapper.h"
3535
#include "CSSParserTokenRange.h"
3636
#include "CSSTokenizerInputStream.h"
37+
#include <wtf/NeverDestroyed.h>
3738
#include <wtf/text/StringBuilder.h>
3839
#include <wtf/text/StringToIntegerConversion.h>
3940
#include <wtf/unicode/CharacterNames.h>

‎Source/WebCore/css/parser/CSSTokenizerInputStream.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
#include "CSSTokenizer.h"
3434

35+
#include <wtf/NeverDestroyed.h>
36+
3537
namespace WebCore {
3638
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(CSSTokenizerInputStream);
3739

‎Source/WebCore/fileapi/FileReaderLoader.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "ThreadableBlobRegistry.h"
5050
#include "ThreadableLoader.h"
5151
#include <JavaScriptCore/ArrayBuffer.h>
52+
#include <wtf/NeverDestroyed.h>
5253
#include <wtf/RefPtr.h>
5354
#include <wtf/StdLibExtras.h>
5455
#include <wtf/Vector.h>
@@ -58,6 +59,8 @@
5859

5960
namespace WebCore {
6061

62+
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(FileReaderLoader);
63+
6164
const int defaultBufferLength = 32768;
6265

6366
FileReaderLoader::FileReaderLoader(ReadType readType, FileReaderLoaderClient* client)

‎Source/WebCore/fileapi/FileReaderLoader.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class ScriptExecutionContext;
5353
class TextResourceDecoder;
5454
class ThreadableLoader;
5555

56+
DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(FileReaderLoader);
5657
class FileReaderLoader final : public ThreadableLoaderClient {
5758
WTF_DEPRECATED_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(FileReaderLoader, FileReaderLoader);
5859
WTF_OVERRIDE_DELETE_FOR_CHECKED_PTR(FileReaderLoader);

‎Source/WebCore/loader/LoaderMalloc.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
#include "config.h"
2727
#include "LoaderMalloc.h"
2828

29+
#include <wtf/NeverDestroyed.h>
30+
2931
namespace WebCore {
3032
DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(Loader);
3133
}

0 commit comments

Comments
 (0)