diff --git a/src/impl/node/weak_realm_notifier.cpp b/src/impl/node/weak_realm_notifier.cpp index ebc188a6..11dff78d 100644 --- a/src/impl/node/weak_realm_notifier.cpp +++ b/src/impl/node/weak_realm_notifier.cpp @@ -16,6 +16,8 @@ // //////////////////////////////////////////////////////////////////////////// +#include + #include "impl/weak_realm_notifier.hpp" #include "shared_realm.hpp" @@ -35,6 +37,8 @@ WeakRealmNotifier::WeakRealmNotifier(const std::shared_ptr& realm, bool c auto realm = realm_weak_ptr->lock(); if (realm) { + // The v8::Local handles need a "scope" to be present or will crash. + Nan::HandleScope scope; realm->notify(); } });