aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/visitors.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-12-04 08:20:37 +0100
committerMichaël Zasso <targos@protonmail.com>2018-12-06 15:23:33 +0100
commit9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch)
tree2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/src/visitors.h
parentb8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff)
downloadandroid-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.bz2
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.zip
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/visitors.h')
-rw-r--r--deps/v8/src/visitors.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/deps/v8/src/visitors.h b/deps/v8/src/visitors.h
index 9098d8b471..ebe58c3e75 100644
--- a/deps/v8/src/visitors.h
+++ b/deps/v8/src/visitors.h
@@ -54,9 +54,9 @@ enum class Root {
// Abstract base class for visiting, and optionally modifying, the
// pointers contained in roots. Used in GC and serialization/deserialization.
-class RootVisitor BASE_EMBEDDED {
+class RootVisitor {
public:
- virtual ~RootVisitor() {}
+ virtual ~RootVisitor() = default;
// Visits a contiguous arrays of pointers in the half-open range
// [start, end). Any or all of the values may be modified on return.
@@ -82,9 +82,9 @@ class RelocIterator;
// Abstract base class for visiting, and optionally modifying, the
// pointers contained in Objects. Used in GC and serialization/deserialization.
-class ObjectVisitor BASE_EMBEDDED {
+class ObjectVisitor {
public:
- virtual ~ObjectVisitor() {}
+ virtual ~ObjectVisitor() = default;
// Visits a contiguous arrays of pointers in the half-open range
// [start, end). Any or all of the values may be modified on return.
@@ -93,6 +93,15 @@ class ObjectVisitor BASE_EMBEDDED {
virtual void VisitPointers(HeapObject* host, MaybeObject** start,
MaybeObject** end) = 0;
+ // Custom weak pointers must be ignored by the GC but not other
+ // visitors. They're used for e.g., lists that are recreated after GC. The
+ // default implementation treats them as strong pointers. Visitors who want to
+ // ignore them must override this function with empty.
+ virtual void VisitCustomWeakPointers(HeapObject* host, Object** start,
+ Object** end) {
+ VisitPointers(host, start, end);
+ }
+
// Handy shorthand for visiting a single pointer.
virtual void VisitPointer(HeapObject* host, Object** p) {
VisitPointers(host, p, p + 1);
@@ -100,6 +109,9 @@ class ObjectVisitor BASE_EMBEDDED {
virtual void VisitPointer(HeapObject* host, MaybeObject** p) {
VisitPointers(host, p, p + 1);
}
+ virtual void VisitCustomWeakPointer(HeapObject* host, Object** p) {
+ VisitCustomWeakPointers(host, p, p + 1);
+ }
// To allow lazy clearing of inline caches the visitor has
// a rich interface for iterating over Code objects ...