v8/test/cctest/setup-isolate-for-tests.h
Olivier Flückiger 8700080c92 [static-roots] Refactor setup_isolate_delegate
Make the setup_isolate_delegate stateless. It does not make sense to
pass a setup delegate to Isolate::Init that would contradict the
configuration of the isolate, hence it does not make sense to let the
delegate decide if heap objects should be created. Instead let the
isolate decide on how to invoke the delegate.

Cleanup in preparation for later changes to mksnapshot.

Bug: v8:13466
Change-Id: I5ca36a1db3e94baf068ba0dc91729a78086a023c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4020172
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Olivier Flückiger <olivf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84550}
2022-11-29 16:23:19 +00:00

25 lines
709 B
C++

// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_TEST_CCTEST_SETUP_ISOLATE_FOR_TESTS_H_
#define V8_TEST_CCTEST_SETUP_ISOLATE_FOR_TESTS_H_
#include "src/init/setup-isolate.h"
namespace v8 {
namespace internal {
class SetupIsolateDelegateForTests : public SetupIsolateDelegate {
public:
SetupIsolateDelegateForTests() = default;
bool SetupHeap(Isolate* isolate, bool create_heap_objects) override;
void SetupBuiltins(Isolate* isolate, bool compile_builtins) override;
};
} // namespace internal
} // namespace v8
#endif // V8_TEST_CCTEST_SETUP_ISOLATE_FOR_TESTS_H_