Commit ed9ea216 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

Fix uses of V8_DEPRECATE_SOON in v8.h

Move brackets enclosing declarator in a couple of V8_DEPRECATE_SOON
cases so that the attribute is correctly placed.

I.e. should come after the class keyword and after a function signature
but before the body.

Also adds suppressions for a case where a replacement method calls
the deprecated method it replaces.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I490ff07a13552cf335186d64ca061f21ac4e8afc
Reviewed-on: https://chromium-review.googlesource.com/1140593Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54527}
parent 6de85602
...@@ -6362,9 +6362,8 @@ class V8_EXPORT AccessorSignature : public Data { ...@@ -6362,9 +6362,8 @@ class V8_EXPORT AccessorSignature : public Data {
// --- Extensions --- // --- Extensions ---
V8_DEPRECATE_SOON("Implementation detail", V8_DEPRECATE_SOON("Implementation detail", class)
class ExternalOneByteStringResourceImpl); V8_EXPORT ExternalOneByteStringResourceImpl
class V8_EXPORT ExternalOneByteStringResourceImpl
: public String::ExternalOneByteStringResource { : public String::ExternalOneByteStringResource {
public: public:
ExternalOneByteStringResourceImpl() : data_(0), length_(0) {} ExternalOneByteStringResourceImpl() : data_(0), length_(0) {}
...@@ -7115,7 +7114,18 @@ class V8_EXPORT EmbedderHeapTracer { ...@@ -7115,7 +7114,18 @@ class V8_EXPORT EmbedderHeapTracer {
* Returns true if there no more tracing work to be done (see AdvanceTracing) * Returns true if there no more tracing work to be done (see AdvanceTracing)
* and false otherwise. * and false otherwise.
*/ */
virtual bool IsTracingDone() { return NumberOfWrappersToTrace() == 0; } virtual bool IsTracingDone() {
// TODO(delphick): When NumberOfWrappersToTrace is removed, this should be
// replaced with: return true;
#if __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
return NumberOfWrappersToTrace() == 0;
#if __clang__
#pragma clang diagnostic pop
#endif
}
/** /**
* Called at the end of a GC cycle. * Called at the end of a GC cycle.
...@@ -7159,7 +7169,9 @@ class V8_EXPORT EmbedderHeapTracer { ...@@ -7159,7 +7169,9 @@ class V8_EXPORT EmbedderHeapTracer {
* Returns the number of wrappers that are still to be traced by the embedder. * Returns the number of wrappers that are still to be traced by the embedder.
*/ */
V8_DEPRECATE_SOON("Use IsTracingDone", V8_DEPRECATE_SOON("Use IsTracingDone",
virtual size_t NumberOfWrappersToTrace() { return 0; }); virtual size_t NumberOfWrappersToTrace()) {
return 0;
};
protected: protected:
virtual ~EmbedderHeapTracer() = default; virtual ~EmbedderHeapTracer() = default;
......
...@@ -214,6 +214,8 @@ ...@@ -214,6 +214,8 @@
# define V8_HAS_ATTRIBUTE_ALIGNED (__has_attribute(aligned)) # define V8_HAS_ATTRIBUTE_ALIGNED (__has_attribute(aligned))
# define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline)) # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline))
# define V8_HAS_ATTRIBUTE_DEPRECATED (__has_attribute(deprecated)) # define V8_HAS_ATTRIBUTE_DEPRECATED (__has_attribute(deprecated))
# define V8_HAS_ATTRIBUTE_DEPRECATED_MESSAGE \
(__has_extension(attribute_deprecated_with_message))
# define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline))
# define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused)) # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused))
# define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility)) # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
......
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