Commit 045a6667 authored by tzik's avatar tzik Committed by Commit Bot

Fix non-clang build failure around STACK_ALLOCATED macro

STACK_ALLOCATED macro leaves `private:` section on clang build after
https://crrev.com/c/1160424, and doesn't change the access specifier
on non-clang build, that seems to confuse non-clang build.

This CL unifies the difference to fix the non-clang build.

Change-Id: I0fdd1236670a5dd64892c19fa642dd4d681e4008
Reviewed-on: https://chromium-review.googlesource.com/1164156Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581144}
parent 130447d6
......@@ -71,20 +71,21 @@ class __thisIsHereToForceASemicolonAfterThisMacro;
friend class ::WTF::internal::__thisIsHereToForceASemicolonAfterThisMacro
#if defined(__clang__)
#define STACK_ALLOCATED() \
public: \
using IsStackAllocatedTypeMarker[[maybe_unused]] = int; \
\
private: \
__attribute__((annotate("blink_stack_allocated"))) void* operator new( \
size_t) = delete; \
void* operator new(size_t, NotNullTag, void*) = delete; \
void* operator new(size_t, void*) = delete
#define ANNOTATE_STACK_ALLOCATED \
__attribute__((annotate("blink_stack_allocated")))
#else
#define STACK_ALLOCATED() DISALLOW_NEW()
#define ANNOTATE_STACK_ALLOCATED
#endif
#define STACK_ALLOCATED() \
public: \
using IsStackAllocatedTypeMarker[[maybe_unused]] = int; \
\
private: \
ANNOTATE_STACK_ALLOCATED void* operator new(size_t) = delete; \
void* operator new(size_t, NotNullTag, void*) = delete; \
void* operator new(size_t, void*) = delete
// Provides customizable overrides of fastMalloc/fastFree and operator
// new/delete
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment