mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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:
1 parent
8d2ba386f1
commit
8a1eaea151
3 files changed
+4
-3
No files matched your search
+1
-1
@@ -332,7 +332,7 @@ class Stream final : public AsyncWrap,
|
||||
// The headers_ field holds a block of headers that have been received and
|
||||
// are being buffered for delivery to the JavaScript side.
|
||||
// TODO(@jasnell): Use v8::Global instead of v8::Local here.
|
||||
std::vector<v8::Local<v8::Value>> headers_;
|
||||
v8::LocalVector<v8::Value> headers_;
|
||||
|
||||
// The headers_kind_ field indicates the kind of headers that are being
|
||||
// buffered.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user