[heap] Remove obsolete AbortTracing calls and deprecate interface

V8 does not abort incremental marking anymore.

Bug: chromium:843903
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Id39e9cf8ef2afc388bab2bbad1d458ee2649f8e8
Reviewed-on: https://chromium-review.googlesource.com/1226889
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56009}
This commit is contained in:
Michael Lippautz 2018-09-17 14:22:34 +02:00 committed by Commit Bot
parent 5cfe1a6b12
commit 1f3802a1e7
4 changed files with 2 additions and 28 deletions

View File

@ -7021,7 +7021,8 @@ class V8_EXPORT EmbedderHeapTracer {
* The embedder is expected to throw away all intermediate data and reset to
* the initial state.
*/
virtual void AbortTracing() = 0;
V8_DEPRECATE_SOON("Obsolete as V8 will not abort tracing anymore.",
virtual void AbortTracing()) {}
/*
* Called by the embedder to request immediate finalization of the currently

View File

@ -24,13 +24,6 @@ void LocalEmbedderHeapTracer::TraceEpilogue() {
remote_tracer_->TraceEpilogue();
}
void LocalEmbedderHeapTracer::AbortTracing() {
if (!InUse()) return;
cached_wrappers_to_trace_.clear();
remote_tracer_->AbortTracing();
}
void LocalEmbedderHeapTracer::EnterFinalPause() {
if (!InUse()) return;

View File

@ -36,7 +36,6 @@ class V8_EXPORT_PRIVATE LocalEmbedderHeapTracer final {
void TracePrologue();
void TraceEpilogue();
void AbortTracing();
void EnterFinalPause();
bool Trace(double deadline);
bool IsRemoteTracingDone();

View File

@ -33,7 +33,6 @@ class MockEmbedderHeapTracer : public EmbedderHeapTracer {
public:
MOCK_METHOD0(TracePrologue, void());
MOCK_METHOD0(TraceEpilogue, void());
MOCK_METHOD0(AbortTracing, void());
MOCK_METHOD1(EnterFinalPause, void(EmbedderHeapTracer::EmbedderStackState));
MOCK_METHOD0(IsTracingDone, bool());
MOCK_METHOD1(RegisterV8References,
@ -76,24 +75,6 @@ TEST(LocalEmbedderHeapTracer, TraceEpilogueForwards) {
local_tracer.TraceEpilogue();
}
TEST(LocalEmbedderHeapTracer, AbortTracingForwards) {
StrictMock<MockEmbedderHeapTracer> remote_tracer;
LocalEmbedderHeapTracer local_tracer(nullptr);
local_tracer.SetRemoteTracer(&remote_tracer);
EXPECT_CALL(remote_tracer, AbortTracing());
local_tracer.AbortTracing();
}
TEST(LocalEmbedderHeapTracer, AbortTracingClearsCachedWrappers) {
StrictMock<MockEmbedderHeapTracer> remote_tracer;
LocalEmbedderHeapTracer local_tracer(nullptr);
local_tracer.SetRemoteTracer(&remote_tracer);
local_tracer.AddWrapperToTrace(CreateWrapperInfo());
EXPECT_CALL(remote_tracer, AbortTracing());
local_tracer.AbortTracing();
EXPECT_EQ(0u, local_tracer.NumberOfCachedWrappersToTrace());
}
TEST(LocalEmbedderHeapTracer, EnterFinalPauseForwards) {
StrictMock<MockEmbedderHeapTracer> remote_tracer;
LocalEmbedderHeapTracer local_tracer(nullptr);