GeezerVison is showing github.com — src: update std::vector<v8::Local<T>> to use v8::LocalVector<T> · nodejs/node@8a1eaea
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/quic/streams.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -332,7 +332,7 @@ class Stream final : public AsyncWrap, |
332 | 332 | // The headers_ field holds a block of headers that have been received and |
333 | 333 | // are being buffered for delivery to the JavaScript side. |
334 | 334 | // TODO(@jasnell): Use v8::Global instead of v8::Local here. |
335 | | - std::vector<v8::Local<v8::Value>> headers_; |
| 335 | + v8::LocalVector<v8::Value> headers_; |
336 | 336 |
|
337 | 337 | // The headers_kind_ field indicates the kind of headers that are being |
338 | 338 | // buffered. |
|
Collapse file
Copy file name to clipboardExpand all lines: test/addons/make-callback/binding.cc +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ void MakeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) { |
11 | 11 | assert(args[1]->IsFunction() || args[1]->IsString()); |
12 | 12 | auto isolate = args.GetIsolate(); |
13 | 13 | auto recv = args[0].As<v8::Object>(); |
14 | | - std::vector<v8::Local<v8::Value>> argv; |
| 14 | + v8::LocalVector<v8::Value> argv(isolate); |
15 | 15 | for (size_t n = 2; n < static_cast<size_t>(args.Length()); n += 1) { |
16 | 16 | argv.push_back(args[n]); |
17 | 17 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: test/addons/openssl-providers/binding.cc +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -13,6 +13,7 @@ using v8::Context; |
13 | 13 | using v8::FunctionCallbackInfo; |
14 | 14 | using v8::Isolate; |
15 | 15 | using v8::Local; |
| 16 | +using v8::LocalVector; |
16 | 17 | using v8::Object; |
17 | 18 | using v8::String; |
18 | 19 | using v8::Value; |
@@ -26,7 +27,7 @@ int collectProviders(OSSL_PROVIDER* provider, void* cbdata) { |
26 | 27 |
|
27 | 28 | inline void GetProviders(const FunctionCallbackInfo<Value>& args) { |
28 | 29 | Isolate* isolate = args.GetIsolate(); |
29 | | - std::vector<Local<Value>> arr = {}; |
| 30 | + LocalVector<Value> arr(isolate, 0); |
30 | 31 | #if OPENSSL_VERSION_MAJOR >= 3 |
31 | 32 | std::vector<OSSL_PROVIDER*> providers; |
32 | 33 | OSSL_PROVIDER_do_all(nullptr, &collectProviders, &providers); |
|