Skip to content

Commit

Permalink
[Squash] use atomic_uint64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Aug 6, 2018
1 parent 9ca9452 commit 825e0d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bootstrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "node_internals.h"
#include "v8.h"

#include <atomic>

namespace node {

using v8::Array;
Expand Down Expand Up @@ -51,8 +53,8 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
}

void PromiseRejectCallback(PromiseRejectMessage message) {
static uint64_t unhandledRejections = 0;
static uint64_t rejectionsHandledAfter = 0;
static std::atomic_uint64_t unhandledRejections{0};
static std::atomic_uint64_t rejectionsHandledAfter{0};

Local<Promise> promise = message.GetPromise();
Isolate* isolate = promise->GetIsolate();
Expand Down

0 comments on commit 825e0d2

Please sign in to comment.