Commit eaafd900 authored by hlopko's avatar hlopko Committed by Commit bot

Introduce EmbedderHeapTracer::EnterFinalPause()

I need this method because of ActiveScriptWrappables, which have to be processed
at the atomic pause even for incremental solution, as there is no other way of
detecting when an object starts or stops being active than querying it.

LOG=no
BUG=468240

Review-Url: https://codereview.chromium.org/2065833003
Cr-Commit-Position: refs/heads/master@{#37062}
parent f5b83dec
......@@ -5469,6 +5469,12 @@ class V8_EXPORT EmbedderHeapTracer {
*/
virtual void TraceEpilogue() = 0;
/**
* Let embedder know v8 entered final marking pause (no more incremental steps
* will follow).
*/
virtual void EnterFinalPause() {}
/**
* Throw away all intermediate data and reset to the initial state.
*/
......
......@@ -868,6 +868,10 @@ void MarkCompactCollector::Prepare() {
}
}
if (UsingEmbedderHeapTracer()) {
embedder_heap_tracer()->EnterFinalPause();
}
// Don't start compaction if we are in the middle of incremental
// marking cycle. We did not collect any slots.
if (!FLAG_never_compact && !was_marked_incrementally_) {
......
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