Commit 436e92e4 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

heap: Add concurrent marking flag to UnifiedHeapMarkingVisitor.

This flag will be used by https://crrev.com/c/1730054.
Submitting as separate CL so that if 1730054 needs to be reverted, we
still have the flag in the code to use in further CLs.

Bug: 986235
Change-Id: I3300937e864f6e3fcd40d6c0a463fae04911e71e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1725643Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684323}
parent 742480cb
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.h" #include "third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h" #include "third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h"
#include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h" #include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
...@@ -18,7 +19,9 @@ UnifiedHeapMarkingVisitorBase::UnifiedHeapMarkingVisitorBase( ...@@ -18,7 +19,9 @@ UnifiedHeapMarkingVisitorBase::UnifiedHeapMarkingVisitorBase(
v8::Isolate* isolate) v8::Isolate* isolate)
: MarkingVisitor(thread_state, mode), : MarkingVisitor(thread_state, mode),
isolate_(isolate), isolate_(isolate),
controller_(thread_state->unified_heap_controller()) { controller_(thread_state->unified_heap_controller()),
is_concurrent_marking_enabled_(base::FeatureList::IsEnabled(
blink::features::kBlinkHeapConcurrentMarking)) {
DCHECK(controller_); DCHECK(controller_);
} }
......
...@@ -27,6 +27,10 @@ class PLATFORM_EXPORT UnifiedHeapMarkingVisitorBase : public MarkingVisitor { ...@@ -27,6 +27,10 @@ class PLATFORM_EXPORT UnifiedHeapMarkingVisitorBase : public MarkingVisitor {
// Visitation methods that announce reachable wrappers to V8. // Visitation methods that announce reachable wrappers to V8.
void Visit(const TraceWrapperV8Reference<v8::Value>&) final; void Visit(const TraceWrapperV8Reference<v8::Value>&) final;
bool is_concurrent_marking_enabled() const {
return is_concurrent_marking_enabled_;
}
protected: protected:
UnifiedHeapMarkingVisitorBase(ThreadState*, MarkingMode, v8::Isolate*); UnifiedHeapMarkingVisitorBase(ThreadState*, MarkingMode, v8::Isolate*);
...@@ -34,6 +38,9 @@ class PLATFORM_EXPORT UnifiedHeapMarkingVisitorBase : public MarkingVisitor { ...@@ -34,6 +38,9 @@ class PLATFORM_EXPORT UnifiedHeapMarkingVisitorBase : public MarkingVisitor {
v8::EmbedderHeapTracer* const controller_; v8::EmbedderHeapTracer* const controller_;
DISALLOW_COPY_AND_ASSIGN(UnifiedHeapMarkingVisitorBase); DISALLOW_COPY_AND_ASSIGN(UnifiedHeapMarkingVisitorBase);
private:
bool is_concurrent_marking_enabled_;
}; };
// Same as the base visitor with the difference that it is bound to main thread. // Same as the base visitor with the difference that it is bound to main thread.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment