// Copyright 2020 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_HANDLES_PERSISTENT_HANDLES_H_ #define V8_HANDLES_PERSISTENT_HANDLES_H_ #include <vector> #include "include/v8-internal.h" #include "src/api/api.h" #include "src/base/macros.h" #include "src/execution/isolate.h" #include "src/objects/visitors.h" #include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck namespace v8 { namespace internal { class Heap; // PersistentHandles serves as a container for handles that can be passed back // and forth between threads. Allocation and deallocation of this class is // thread-safe and the isolate tracks all PersistentHandles containers. class PersistentHandles { … }; class PersistentHandlesList { … }; // PersistentHandlesScope sets up a scope in which all created main thread // handles become persistent handles that can be sent to another thread. class V8_NODISCARD PersistentHandlesScope { … }; } // namespace internal } // namespace v8 #endif // V8_HANDLES_PERSISTENT_HANDLES_H_