Skip to content

Commit b72e213

Browse files
committed
Fix c++17
1 parent 4c69a66 commit b72e213

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

module.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ void CaptureStackTraces(const FunctionCallbackInfo<Value> &args) {
113113
futures.emplace_back(std::async(
114114
std::launch::async,
115115
[thread_name, state](Isolate *isolate) -> ThreadResult {
116-
return {thread_name, state,
116+
return {.thread_name = thread_name,
117+
.state = state,
117118
.stack_frames = CaptureStackTrace(isolate)};
118119
},
119120
thread_isolate));
@@ -236,8 +237,9 @@ void RegisterThread(const FunctionCallbackInfo<Value> &args) {
236237
std::lock_guard<std::mutex> lock(threads_mutex);
237238
auto found = threads.find(isolate);
238239
if (found == threads.end()) {
239-
threads.emplace(
240-
isolate, ThreadInfo{thread_name, milliseconds::zero(), .state = ""});
240+
threads.emplace(isolate, ThreadInfo{.thread_name = thread_name,
241+
.last_seen = milliseconds::zero(),
242+
.state = ""});
241243
// Register a cleanup hook to remove this thread when the isolate is
242244
// destroyed
243245
node::AddEnvironmentCleanupHook(isolate, Cleanup, isolate);

0 commit comments

Comments
 (0)