From 5ecf13c2619016c2bec77ed5310a4b7ff3c6e70f Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Tue, 17 May 2016 16:40:10 -0700 Subject: [PATCH] Create a HandleScope before calling callbacks --- src/object-store/src/impl/node/weak_realm_notifier.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/object-store/src/impl/node/weak_realm_notifier.cpp b/src/object-store/src/impl/node/weak_realm_notifier.cpp index ebc188a6..11dff78d 100644 --- a/src/object-store/src/impl/node/weak_realm_notifier.cpp +++ b/src/object-store/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(); } });