// 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_UTILS_DETACHABLE_VECTOR_H_ #define V8_UTILS_DETACHABLE_VECTOR_H_ #include <stddef.h> #include <algorithm> #include "src/base/logging.h" #include "src/base/macros.h" namespace v8 { namespace internal { class V8_EXPORT_PRIVATE DetachableVectorBase { … }; // This class wraps an array and provides a few of the common member // functions for accessing the data. Two extra methods are also provided: free() // and detach(), which allow for manual control of the backing store. This is // currently required for use in the HandleScopeImplementer. Any other class // should just use a std::vector. template <typename T> class DetachableVector : public DetachableVectorBase { … }; } // namespace internal } // namespace v8 #endif // V8_UTILS_DETACHABLE_VECTOR_H_