fff219bff7
This CL adds 2 new values to the EmbedderStackState enum with more explicit names. The old values are updated as aliases to the new values and marked as soon to be deprecated. This CL also moves the enum to v8-platform.h so that it can be reused by cppgc. Depracating individual values in an enum is supported by GCC only since version 6. Thus new macros were needed for the deprecation (which delegate to the existing macros when supported). GCC versions older than 6 are still used by the CQ bots. Bug: chromium:1056170 Change-Id: Id1ea73edfbbae282b0d8a3bb103dbbbf8ebd417e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2188971 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#67744}
27 lines
824 B
C++
27 lines
824 B
C++
// Copyright 2020 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef INCLUDE_CPPGC_COMMON_H_
|
|
#define INCLUDE_CPPGC_COMMON_H_
|
|
|
|
// TODO(chromium:1056170): Remove dependency on v8.
|
|
#include "v8config.h" // NOLINT(build/include_directory)
|
|
|
|
namespace cppgc {
|
|
|
|
// Indicator for the stack state of the embedder.
|
|
enum class EmbedderStackState {
|
|
kMayContainHeapPointers,
|
|
kNoHeapPointers,
|
|
kUnknown V8_ENUM_DEPRECATE_SOON("Use kMayContainHeapPointers") =
|
|
kMayContainHeapPointers,
|
|
kNonEmpty V8_ENUM_DEPRECATE_SOON("Use kMayContainHeapPointers") =
|
|
kMayContainHeapPointers,
|
|
kEmpty V8_ENUM_DEPRECATE_SOON("Use kNoHeapPointers") = kNoHeapPointers,
|
|
};
|
|
|
|
} // namespace cppgc
|
|
|
|
#endif // INCLUDE_CPPGC_COMMON_H_
|