diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-07-08 02:42:07 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-07-14 16:04:43 +0300 |
commit | e2f9dc6e5a82392dad4f4451fa56edd178ac0e8f (patch) | |
tree | 0b80e520662e74e8832335eaedd0552bcae5f7fe /src/inspector_agent.cc | |
parent | 18667ac6f54a4a2a781f1cf6380ac0660196e5e5 (diff) |
src: remove user_data from TimerWrap
There’s no point in having an opaque user data pointer when we’re
already using `std::function`.
PR-URL: https://github.com/nodejs/node/pull/34252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/inspector_agent.cc')
-rw-r--r-- | src/inspector_agent.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index a3c0e42375a..13ebffdc049 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -525,7 +525,7 @@ class NodeInspectorClient : public V8InspectorClient { void* data) override { auto result = timers_.emplace(std::piecewise_construct, std::make_tuple(data), - std::make_tuple(env_, callback, data)); + std::make_tuple(env_, [=]() { callback(data); })); CHECK(result.second); uint64_t interval = 1000 * interval_s; result.first->second.Update(interval, interval); |