[cleanup][test] Remove redundant NOLINT annotations
cpplint rules change over time, and we change the exact rules we enable for v8. This CL removes NOLINT annotations which are not needed according to the currently enabled rules. R=ahaas@chromium.org Bug: v8:11717 Change-Id: Ica92f4ddc9c351c1c63147cbcf050086ca26cc07 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859854 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#74297}
This commit is contained in:
parent
f24b38af2c
commit
52c7ab5654
@ -46,7 +46,7 @@
|
||||
#endif // V8_USE_PERFETTO
|
||||
|
||||
#if V8_OS_WIN
|
||||
#include <windows.h> // NOLINT
|
||||
#include <windows.h>
|
||||
#if V8_CC_MSVC
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
@ -7,7 +7,7 @@
|
||||
#if V8_OS_POSIX
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h> // NOLINT
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "src/init/v8.h"
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <string>
|
||||
|
||||
#if V8_OS_POSIX
|
||||
#include <unistd.h> // NOLINT
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "include/v8-fast-api-calls.h"
|
||||
@ -8534,12 +8534,8 @@ THREADED_TEST(StringWrite) {
|
||||
CHECK_EQ(0, str->Write(isolate, nullptr, 0, 0, String::NO_NULL_TERMINATION));
|
||||
}
|
||||
|
||||
|
||||
static void Utf16Helper(
|
||||
LocalContext& context, // NOLINT
|
||||
const char* name,
|
||||
const char* lengths_name,
|
||||
int len) {
|
||||
static void Utf16Helper(LocalContext& context, const char* name,
|
||||
const char* lengths_name, int len) {
|
||||
Local<v8::Array> a = Local<v8::Array>::Cast(
|
||||
context->Global()->Get(context.local(), v8_str(name)).ToLocalChecked());
|
||||
Local<v8::Array> alens =
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
#include <iostream>
|
||||
|
||||
#include "src/base/utils/random-number-generator.h"
|
||||
#include "src/codegen/assembler-inl.h"
|
||||
|
@ -25,9 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
|
||||
#include "src/init/v8.h"
|
||||
#include <iostream>
|
||||
|
||||
#include "src/base/utils/random-number-generator.h"
|
||||
#include "src/codegen/assembler-inl.h"
|
||||
@ -35,7 +33,7 @@
|
||||
#include "src/diagnostics/disassembler.h"
|
||||
#include "src/execution/simulator.h"
|
||||
#include "src/heap/factory.h"
|
||||
|
||||
#include "src/init/v8.h"
|
||||
#include "test/cctest/cctest.h"
|
||||
|
||||
namespace v8 {
|
||||
|
@ -25,9 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
|
||||
#include "src/init/v8.h"
|
||||
#include <iostream>
|
||||
|
||||
#include "src/base/utils/random-number-generator.h"
|
||||
#include "src/codegen/assembler-inl.h"
|
||||
@ -35,7 +33,7 @@
|
||||
#include "src/diagnostics/disassembler.h"
|
||||
#include "src/execution/simulator.h"
|
||||
#include "src/heap/factory.h"
|
||||
|
||||
#include "src/init/v8.h"
|
||||
#include "test/cctest/cctest.h"
|
||||
|
||||
namespace v8 {
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
#include <iostream>
|
||||
|
||||
#include "src/base/utils/random-number-generator.h"
|
||||
#include "src/codegen/assembler-inl.h"
|
||||
|
@ -693,7 +693,7 @@ void TestCompileFunctionInContextToStringImpl() {
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
{ // NOLINT
|
||||
{
|
||||
CcTest::InitializeVM();
|
||||
v8::Isolate* isolate = CcTest::isolate();
|
||||
v8::HandleScope scope(isolate);
|
||||
|
@ -156,7 +156,7 @@ TEST(NormalizedBoundaries) {
|
||||
// 1.5 does not have a significand of the form 2^p (for some p).
|
||||
// Therefore its boundaries are at the same distance.
|
||||
CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f());
|
||||
CHECK((1 << 10) == diy_fp.f() - boundary_minus.f()); // NOLINT
|
||||
CHECK((1 << 10) == diy_fp.f() - boundary_minus.f());
|
||||
|
||||
diy_fp = Double(1.0).AsNormalizedDiyFp();
|
||||
Double(1.0).NormalizedBoundaries(&boundary_minus, &boundary_plus);
|
||||
@ -165,8 +165,8 @@ TEST(NormalizedBoundaries) {
|
||||
// 1.0 does have a significand of the form 2^p (for some p).
|
||||
// Therefore its lower boundary is twice as close as the upper boundary.
|
||||
CHECK_GT(boundary_plus.f() - diy_fp.f(), diy_fp.f() - boundary_minus.f());
|
||||
CHECK((1 << 9) == diy_fp.f() - boundary_minus.f()); // NOLINT
|
||||
CHECK((1 << 10) == boundary_plus.f() - diy_fp.f()); // NOLINT
|
||||
CHECK((1 << 9) == diy_fp.f() - boundary_minus.f());
|
||||
CHECK((1 << 10) == boundary_plus.f() - diy_fp.f());
|
||||
|
||||
uint64_t min_double64 = 0x0000'0000'0000'0001;
|
||||
diy_fp = Double(min_double64).AsNormalizedDiyFp();
|
||||
@ -177,8 +177,7 @@ TEST(NormalizedBoundaries) {
|
||||
// Therefore its boundaries are at the same distance.
|
||||
CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f());
|
||||
// Denormals have their boundaries much closer.
|
||||
CHECK((static_cast<uint64_t>(1) << 62) ==
|
||||
diy_fp.f() - boundary_minus.f()); // NOLINT
|
||||
CHECK((static_cast<uint64_t>(1) << 62) == diy_fp.f() - boundary_minus.f());
|
||||
|
||||
uint64_t smallest_normal64 = 0x0010'0000'0000'0000;
|
||||
diy_fp = Double(smallest_normal64).AsNormalizedDiyFp();
|
||||
@ -189,7 +188,7 @@ TEST(NormalizedBoundaries) {
|
||||
// Even though the significand is of the form 2^p (for some p), its boundaries
|
||||
// are at the same distance. (This is the only exception).
|
||||
CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f());
|
||||
CHECK((1 << 10) == diy_fp.f() - boundary_minus.f()); // NOLINT
|
||||
CHECK((1 << 10) == diy_fp.f() - boundary_minus.f());
|
||||
|
||||
uint64_t largest_denormal64 = 0x000F'FFFF'FFFF'FFFF;
|
||||
diy_fp = Double(largest_denormal64).AsNormalizedDiyFp();
|
||||
@ -198,7 +197,7 @@ TEST(NormalizedBoundaries) {
|
||||
CHECK_EQ(diy_fp.e(), boundary_minus.e());
|
||||
CHECK_EQ(diy_fp.e(), boundary_plus.e());
|
||||
CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f());
|
||||
CHECK((1 << 11) == diy_fp.f() - boundary_minus.f()); // NOLINT
|
||||
CHECK((1 << 11) == diy_fp.f() - boundary_minus.f());
|
||||
|
||||
uint64_t max_double64 = 0x7FEF'FFFF'FFFF'FFFF;
|
||||
diy_fp = Double(max_double64).AsNormalizedDiyFp();
|
||||
@ -208,7 +207,7 @@ TEST(NormalizedBoundaries) {
|
||||
// max-value does not have a significand of the form 2^p (for some p).
|
||||
// Therefore its boundaries are at the same distance.
|
||||
CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f());
|
||||
CHECK((1 << 10) == diy_fp.f() - boundary_minus.f()); // NOLINT
|
||||
CHECK((1 << 10) == diy_fp.f() - boundary_minus.f());
|
||||
}
|
||||
|
||||
|
||||
|
@ -245,7 +245,7 @@ static void CFuncDoTrace(byte dummy_param) {
|
||||
#elif V8_CC_MSVC
|
||||
// Approximate a frame pointer address. We compile without base pointers,
|
||||
// so we can't trust ebp/rbp.
|
||||
fp = reinterpret_cast<Address>(&dummy_param) - 2 * sizeof(void*); // NOLINT
|
||||
fp = reinterpret_cast<Address>(&dummy_param) - 2 * sizeof(void*);
|
||||
#else
|
||||
#error Unexpected platform.
|
||||
#endif
|
||||
|
@ -26,7 +26,8 @@
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "src/api/api-inl.h"
|
||||
#include "src/base/utils/random-number-generator.h"
|
||||
|
@ -26,7 +26,8 @@
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "src/codegen/assembler-inl.h"
|
||||
#include "src/codegen/macro-assembler.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
#include <iostream>
|
||||
|
||||
#include "src/base/utils/random-number-generator.h"
|
||||
#include "src/codegen/assembler-inl.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <iostream> // NOLINT(readability/streams)
|
||||
#include <iostream>
|
||||
|
||||
#include "src/base/utils/random-number-generator.h"
|
||||
#include "src/codegen/assembler-inl.h"
|
||||
|
@ -1087,7 +1087,7 @@ TEST(ExternalShortStringAdd) {
|
||||
" var non_one_byte_chars = "
|
||||
"'\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1"
|
||||
"234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\u1234\\"
|
||||
"u1234';" // NOLINT
|
||||
"u1234';"
|
||||
" if (one_byte_chars.length != max_length) return 1;"
|
||||
" if (non_one_byte_chars.length != max_length) return 2;"
|
||||
" var one_byte = Array(max_length + 1);"
|
||||
|
@ -3,8 +3,8 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <unistd.h> // NOLINT
|
||||
#endif // !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <unistd.h>
|
||||
#endif // !defined(_WIN32) && !defined(_WIN64)
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <unistd.h> // NOLINT
|
||||
#endif // !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <unistd.h>
|
||||
#endif // !defined(_WIN32) && !defined(_WIN64)
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include "src/flags/flags.h"
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <unistd.h> // NOLINT
|
||||
#endif // !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <unistd.h>
|
||||
#endif // !defined(_WIN32) && !defined(_WIN64)
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <ostream> // NOLINT
|
||||
#include <ostream>
|
||||
|
||||
#include "testing/gtest-support.h"
|
||||
|
||||
|
@ -5118,11 +5118,9 @@ namespace {
|
||||
// Builds a call with the specified signature and nodes as arguments.
|
||||
// Then checks that the correct number of kArm64Poke and kArm64PokePair were
|
||||
// generated.
|
||||
void TestPokePair(
|
||||
InstructionSelectorTest::StreamBuilder* m, // NOLINT(runtime/references)
|
||||
Zone* zone,
|
||||
MachineSignature::Builder* builder, // NOLINT(runtime/references)
|
||||
Node* nodes[], int num_nodes, int expected_poke_pair, int expected_poke) {
|
||||
void TestPokePair(InstructionSelectorTest::StreamBuilder* m, Zone* zone,
|
||||
MachineSignature::Builder* builder, Node* nodes[],
|
||||
int num_nodes, int expected_poke_pair, int expected_poke) {
|
||||
auto call_descriptor =
|
||||
InstructionSelectorTest::StreamBuilder::MakeSimpleCallDescriptor(
|
||||
zone, builder->Build());
|
||||
|
@ -139,11 +139,8 @@ TEST_F(UnifiedHeapSnapshotTest, RetainedByCppRoot) {
|
||||
cppgc::MakeGarbageCollected<GCed>(allocation_handle());
|
||||
const v8::HeapSnapshot* snapshot = TakeHeapSnapshot();
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(
|
||||
ContainsRetainingPath(*snapshot, {
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<GCed>() // NOLINT
|
||||
}));
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot, {kExpectedCppRootsName, GetExpectedName<GCed>()}));
|
||||
}
|
||||
|
||||
TEST_F(UnifiedHeapSnapshotTest, RetainedByCppCrossThreadRoot) {
|
||||
@ -152,10 +149,7 @@ TEST_F(UnifiedHeapSnapshotTest, RetainedByCppCrossThreadRoot) {
|
||||
const v8::HeapSnapshot* snapshot = TakeHeapSnapshot();
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot, {
|
||||
kExpectedCppCrossThreadRootsName, // NOLINT
|
||||
GetExpectedName<GCed>() // NOLINT
|
||||
}));
|
||||
*snapshot, {kExpectedCppCrossThreadRootsName, GetExpectedName<GCed>()}));
|
||||
}
|
||||
|
||||
TEST_F(UnifiedHeapSnapshotTest, RetainingUnnamedType) {
|
||||
@ -168,10 +162,8 @@ TEST_F(UnifiedHeapSnapshotTest, RetainingUnnamedType) {
|
||||
*snapshot, {kExpectedCppRootsName, cppgc::NameProvider::kHiddenName}));
|
||||
} else {
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot, {
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<BaseWithoutName>() // NOLINT
|
||||
}));
|
||||
*snapshot,
|
||||
{kExpectedCppRootsName, GetExpectedName<BaseWithoutName>()}));
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,11 +175,8 @@ TEST_F(UnifiedHeapSnapshotTest, RetainingNamedThroughUnnamed) {
|
||||
const v8::HeapSnapshot* snapshot = TakeHeapSnapshot();
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot, {
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<BaseWithoutName>(), // NOLINT
|
||||
GetExpectedName<GCed>() // NOLINT
|
||||
}));
|
||||
*snapshot, {kExpectedCppRootsName, GetExpectedName<BaseWithoutName>(),
|
||||
GetExpectedName<GCed>()}));
|
||||
}
|
||||
|
||||
TEST_F(UnifiedHeapSnapshotTest, PendingCallStack) {
|
||||
@ -212,14 +201,10 @@ TEST_F(UnifiedHeapSnapshotTest, PendingCallStack) {
|
||||
cppgc::Persistent<BaseWithoutName> holder(second);
|
||||
const v8::HeapSnapshot* snapshot = TakeHeapSnapshot();
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(
|
||||
ContainsRetainingPath(*snapshot,
|
||||
{
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<BaseWithoutName>(), // NOLINT
|
||||
GetExpectedName<BaseWithoutName>(), // NOLINT
|
||||
GetExpectedName<GCed>() // NOLINT
|
||||
}));
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot,
|
||||
{kExpectedCppRootsName, GetExpectedName<BaseWithoutName>(),
|
||||
GetExpectedName<BaseWithoutName>(), GetExpectedName<GCed>()}));
|
||||
}
|
||||
|
||||
TEST_F(UnifiedHeapSnapshotTest, ReferenceToFinishedSCC) {
|
||||
@ -250,15 +235,11 @@ TEST_F(UnifiedHeapSnapshotTest, ReferenceToFinishedSCC) {
|
||||
cppgc::Persistent<BaseWithoutName> holder(first);
|
||||
const v8::HeapSnapshot* snapshot = TakeHeapSnapshot();
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(
|
||||
ContainsRetainingPath(*snapshot,
|
||||
{
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<BaseWithoutName>(), // NOLINT
|
||||
GetExpectedName<BaseWithoutName>(), // NOLINT
|
||||
GetExpectedName<BaseWithoutName>(), // NOLINT
|
||||
GetExpectedName<GCed>() // NOLINT
|
||||
}));
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot,
|
||||
{kExpectedCppRootsName, GetExpectedName<BaseWithoutName>(),
|
||||
GetExpectedName<BaseWithoutName>(), GetExpectedName<BaseWithoutName>(),
|
||||
GetExpectedName<GCed>()}));
|
||||
}
|
||||
|
||||
namespace {
|
||||
@ -344,13 +325,9 @@ TEST_F(UnifiedHeapSnapshotTest, JSReferenceForcesVisibleObject) {
|
||||
testing_scope, allocation_handle(), "LeafJSObject");
|
||||
const v8::HeapSnapshot* snapshot = TakeHeapSnapshot();
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(
|
||||
ContainsRetainingPath(*snapshot,
|
||||
{
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<GCedWithJSRef>(), // NOLINT
|
||||
"LeafJSObject" // NOLINT
|
||||
}));
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot, {kExpectedCppRootsName, GetExpectedName<GCedWithJSRef>(),
|
||||
"LeafJSObject"}));
|
||||
}
|
||||
|
||||
TEST_F(UnifiedHeapSnapshotTest, MergedWrapperNode) {
|
||||
@ -378,12 +355,9 @@ TEST_F(UnifiedHeapSnapshotTest, MergedWrapperNode) {
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(ContainsRetainingPath(
|
||||
*snapshot,
|
||||
{
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<GCedWithJSRef>(), // NOLINT
|
||||
// GCedWithJSRef is merged into MergedObject, replacing its name.
|
||||
"NextObject" // NOLINT
|
||||
}));
|
||||
{kExpectedCppRootsName, GetExpectedName<GCedWithJSRef>(),
|
||||
// GCedWithJSRef is merged into MergedObject, replacing its name.
|
||||
"NextObject"}));
|
||||
const size_t js_size = Utils::OpenHandle(*wrapper_object)->Size();
|
||||
#if CPPGC_SUPPORTS_OBJECT_NAMES
|
||||
const size_t cpp_size =
|
||||
@ -447,11 +421,10 @@ TEST_F(UnifiedHeapSnapshotTest, NoTriggerForClassIdZero) {
|
||||
EXPECT_EQ(0u, DetachednessHandler::callback_count);
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(
|
||||
ContainsRetainingPath(*snapshot,
|
||||
{
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<GCedWithJSRef>(), // NOLINT
|
||||
}));
|
||||
ContainsRetainingPath(*snapshot, {
|
||||
kExpectedCppRootsName,
|
||||
GetExpectedName<GCedWithJSRef>(),
|
||||
}));
|
||||
ForEachEntryWithName(
|
||||
snapshot, GetExpectedName<GCedWithJSRef>(), [](const HeapEntry& entry) {
|
||||
EXPECT_EQ(kExpectedDetachedValueForUnknown, entry.detachedness());
|
||||
@ -473,11 +446,10 @@ TEST_F(UnifiedHeapSnapshotTest, TriggerDetachednessCallbackSettingAttached) {
|
||||
EXPECT_EQ(1u, DetachednessHandler::callback_count);
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(
|
||||
ContainsRetainingPath(*snapshot,
|
||||
{
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<GCedWithJSRef>(), // NOLINT
|
||||
}));
|
||||
ContainsRetainingPath(*snapshot, {
|
||||
kExpectedCppRootsName,
|
||||
GetExpectedName<GCedWithJSRef>(),
|
||||
}));
|
||||
ForEachEntryWithName(
|
||||
snapshot, GetExpectedName<GCedWithJSRef>(), [](const HeapEntry& entry) {
|
||||
EXPECT_EQ(kExpectedDetachedValueForAttached, entry.detachedness());
|
||||
@ -499,11 +471,10 @@ TEST_F(UnifiedHeapSnapshotTest, TriggerDetachednessCallbackSettingDetached) {
|
||||
EXPECT_EQ(1u, DetachednessHandler::callback_count);
|
||||
EXPECT_TRUE(IsValidSnapshot(snapshot));
|
||||
EXPECT_TRUE(
|
||||
ContainsRetainingPath(*snapshot,
|
||||
{
|
||||
kExpectedCppRootsName, // NOLINT
|
||||
GetExpectedName<GCedWithJSRef>(), // NOLINT
|
||||
}));
|
||||
ContainsRetainingPath(*snapshot, {
|
||||
kExpectedCppRootsName,
|
||||
GetExpectedName<GCedWithJSRef>(),
|
||||
}));
|
||||
ForEachEntryWithName(
|
||||
snapshot, GetExpectedName<GCedWithJSRef>(), [](const HeapEntry& entry) {
|
||||
EXPECT_EQ(kExpectedDetachedValueForDetached, entry.detachedness());
|
||||
|
@ -68,7 +68,7 @@ namespace internal {
|
||||
SaveFlags::SaveFlags() {
|
||||
// For each flag, save the current flag value.
|
||||
#define FLAG_MODE_APPLY(ftype, ctype, nam, def, cmt) SAVED_##nam = FLAG_##nam;
|
||||
#include "src/flags/flag-definitions.h" // NOLINT
|
||||
#include "src/flags/flag-definitions.h"
|
||||
#undef FLAG_MODE_APPLY
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ class V8_NODISCARD SaveFlags {
|
||||
|
||||
private:
|
||||
#define FLAG_MODE_APPLY(ftype, ctype, nam, def, cmt) ctype SAVED_##nam;
|
||||
#include "src/flags/flag-definitions.h" // NOLINT
|
||||
#include "src/flags/flag-definitions.h"
|
||||
#undef FLAG_MODE_APPLY
|
||||
};
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
#if V8_OS_POSIX
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h> // NOLINT
|
||||
#endif // V8_OS_POSIX
|
||||
#include <unistd.h>
|
||||
#endif // V8_OS_POSIX
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user