src: update std::vector<v8::Local<T>> to use v8::LocalVector<T>
PR-URL: https://github.com/nodejs/node/pull/58500 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
parent
8b41429499
commit
50bdd94e0b
@ -203,7 +203,7 @@ class Stream : public AsyncWrap,
|
||||
std::unique_ptr<Outbound> outbound_;
|
||||
std::shared_ptr<DataQueue> inbound_;
|
||||
|
||||
std::vector<v8::Local<v8::Value>> headers_;
|
||||
v8::LocalVector<v8::Value> headers_;
|
||||
HeadersKind headers_kind_ = HeadersKind::INITIAL;
|
||||
size_t headers_length_ = 0;
|
||||
|
||||
|
@ -11,7 +11,7 @@ void MakeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
assert(args[1]->IsFunction() || args[1]->IsString());
|
||||
auto isolate = args.GetIsolate();
|
||||
auto recv = args[0].As<v8::Object>();
|
||||
std::vector<v8::Local<v8::Value>> argv;
|
||||
v8::LocalVector<v8::Value> argv(isolate);
|
||||
for (size_t n = 2; n < static_cast<size_t>(args.Length()); n += 1) {
|
||||
argv.push_back(args[n]);
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ using v8::Context;
|
||||
using v8::FunctionCallbackInfo;
|
||||
using v8::Isolate;
|
||||
using v8::Local;
|
||||
using v8::LocalVector;
|
||||
using v8::Object;
|
||||
using v8::String;
|
||||
using v8::Value;
|
||||
@ -26,7 +27,7 @@ int collectProviders(OSSL_PROVIDER* provider, void* cbdata) {
|
||||
|
||||
inline void GetProviders(const FunctionCallbackInfo<Value>& args) {
|
||||
Isolate* isolate = args.GetIsolate();
|
||||
std::vector<Local<Value>> arr = {};
|
||||
LocalVector<Value> arr(isolate, 0);
|
||||
#if OPENSSL_VERSION_MAJOR >= 3
|
||||
std::vector<OSSL_PROVIDER*> providers;
|
||||
OSSL_PROVIDER_do_all(nullptr, &collectProviders, &providers);
|
||||
|
Loading…
x
Reference in New Issue
Block a user