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/1140593 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#54527}
This commit is contained in:
parent
6de8560209
commit
ed9ea21661
22
include/v8.h
22
include/v8.h
@ -6362,9 +6362,8 @@ class V8_EXPORT AccessorSignature : public Data {
|
||||
|
||||
|
||||
// --- Extensions ---
|
||||
V8_DEPRECATE_SOON("Implementation detail",
|
||||
class ExternalOneByteStringResourceImpl);
|
||||
class V8_EXPORT ExternalOneByteStringResourceImpl
|
||||
V8_DEPRECATE_SOON("Implementation detail", class)
|
||||
V8_EXPORT ExternalOneByteStringResourceImpl
|
||||
: public String::ExternalOneByteStringResource {
|
||||
public:
|
||||
ExternalOneByteStringResourceImpl() : data_(0), length_(0) {}
|
||||
@ -7115,7 +7114,18 @@ class V8_EXPORT EmbedderHeapTracer {
|
||||
* Returns true if there no more tracing work to be done (see AdvanceTracing)
|
||||
* 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.
|
||||
@ -7159,7 +7169,9 @@ class V8_EXPORT EmbedderHeapTracer {
|
||||
* Returns the number of wrappers that are still to be traced by the embedder.
|
||||
*/
|
||||
V8_DEPRECATE_SOON("Use IsTracingDone",
|
||||
virtual size_t NumberOfWrappersToTrace() { return 0; });
|
||||
virtual size_t NumberOfWrappersToTrace()) {
|
||||
return 0;
|
||||
};
|
||||
|
||||
protected:
|
||||
virtual ~EmbedderHeapTracer() = default;
|
||||
|
@ -214,6 +214,8 @@
|
||||
# define V8_HAS_ATTRIBUTE_ALIGNED (__has_attribute(aligned))
|
||||
# define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline))
|
||||
# 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_UNUSED (__has_attribute(unused))
|
||||
# define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
|
||||
|
Loading…
Reference in New Issue
Block a user