summaryrefslogtreecommitdiff
path: root/deps/v8/test
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-03-30 15:21:26 +0100
committerMichaël Zasso <targos@protonmail.com>2019-04-03 08:29:22 +0200
commit2ea9de2e85d937c9bc5d778c623b22614c2b8a72 (patch)
tree79a3248a0be08358e092342b33250adc8f936810 /deps/v8/test
parent98b5ba840e00cea1614266745fa0ccf1e6211315 (diff)
downloadandroid-node-v8-2ea9de2e85d937c9bc5d778c623b22614c2b8a72.tar.gz
android-node-v8-2ea9de2e85d937c9bc5d778c623b22614c2b8a72.tar.bz2
android-node-v8-2ea9de2e85d937c9bc5d778c623b22614c2b8a72.zip
deps: V8: cherry-pick f4b860d
Original commit message: [heap,api] Remove deprecated APIs Bug: chromium:923361, v8:8834 Change-Id: I6ec42aeb74bea5c0629fcdc3f95c125f5de534a0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526195 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#60289} Refs: https://github.com/v8/v8/commit/f4b860d9b81956fb9d6815932522f4043fef56fa PR-URL: https://github.com/nodejs/node/pull/27013 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/test')
-rw-r--r--deps/v8/test/cctest/heap/test-heap.cc20
-rw-r--r--deps/v8/test/cctest/test-api.cc37
2 files changed, 0 insertions, 57 deletions
diff --git a/deps/v8/test/cctest/heap/test-heap.cc b/deps/v8/test/cctest/heap/test-heap.cc
index f12ba10979..1d06f46086 100644
--- a/deps/v8/test/cctest/heap/test-heap.cc
+++ b/deps/v8/test/cctest/heap/test-heap.cc
@@ -531,14 +531,9 @@ TEST(WeakGlobalHandlesScavenge) {
// Scavenge treats weak pointers as normal roots.
CcTest::CollectGarbage(NEW_SPACE);
-
CHECK((*h1)->IsString());
CHECK((*h2)->IsHeapNumber());
-
CHECK(!WeakPointerCleared);
- CHECK(!global_handles->IsNearDeath(h2.location()));
- CHECK(!global_handles->IsNearDeath(h1.location()));
-
GlobalHandles::Destroy(h1.location());
GlobalHandles::Destroy(h2.location());
}
@@ -576,11 +571,8 @@ TEST(WeakGlobalUnmodifiedApiHandlesScavenge) {
&TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
CcTest::CollectGarbage(NEW_SPACE);
-
CHECK((*h1)->IsHeapNumber());
CHECK(WeakPointerCleared);
- CHECK(!global_handles->IsNearDeath(h1.location()));
-
GlobalHandles::Destroy(h1.location());
}
@@ -617,10 +609,7 @@ TEST(WeakGlobalApiHandleModifiedMapScavenge) {
&TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
CcTest::CollectGarbage(NEW_SPACE);
-
CHECK(!WeakPointerCleared);
- CHECK(!global_handles->IsNearDeath(h1.location()));
-
GlobalHandles::Destroy(h1.location());
}
@@ -661,10 +650,7 @@ TEST(WeakGlobalApiHandleWithElementsScavenge) {
&TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
CcTest::CollectGarbage(NEW_SPACE);
-
CHECK(!WeakPointerCleared);
- CHECK(!global_handles->IsNearDeath(h1.location()));
-
GlobalHandles::Destroy(h1.location());
}
@@ -699,17 +685,11 @@ TEST(WeakGlobalHandlesMark) {
GlobalHandles::MakeWeak(
h2.location(), reinterpret_cast<void*>(&handle_and_id),
&TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
- CHECK(!GlobalHandles::IsNearDeath(h1.location()));
- CHECK(!GlobalHandles::IsNearDeath(h2.location()));
// Incremental marking potentially marked handles before they turned weak.
CcTest::CollectAllGarbage();
-
CHECK((*h1)->IsString());
-
CHECK(WeakPointerCleared);
- CHECK(!GlobalHandles::IsNearDeath(h1.location()));
-
GlobalHandles::Destroy(h1.location());
}
diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc
index aae1b3674e..2edc5b5002 100644
--- a/deps/v8/test/cctest/test-api.cc
+++ b/deps/v8/test/cctest/test-api.cc
@@ -20545,43 +20545,6 @@ TEST(WrapperClassId) {
object.Reset();
}
-
-TEST(PersistentHandleInNewSpaceVisitor) {
- LocalContext context;
- v8::Isolate* isolate = context->GetIsolate();
- v8::HandleScope scope(isolate);
- v8::Persistent<v8::Object> object1(isolate, v8::Object::New(isolate));
- CHECK_EQ(0, object1.WrapperClassId());
- object1.SetWrapperClassId(42);
- CHECK_EQ(42, object1.WrapperClassId());
-
- CcTest::CollectAllGarbage();
- CcTest::CollectAllGarbage();
-
- v8::Persistent<v8::Object> object2(isolate, v8::Object::New(isolate));
- CHECK_EQ(0, object2.WrapperClassId());
- object2.SetWrapperClassId(42);
- CHECK_EQ(42, object2.WrapperClassId());
-
- Visitor42 visitor(&object2);
-#if __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated"
-#endif
- // VisitHandlesForPartialDependence is marked deprecated. This test will be
- // removed with the API method.
- isolate->VisitHandlesForPartialDependence(&visitor);
-#if __clang__
-#pragma clang diagnostic pop
-#endif
-
- CHECK_EQ(1, visitor.counter_);
-
- object1.Reset();
- object2.Reset();
-}
-
-
TEST(RegExp) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());