mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-12 07:14:23 +00:00
Create a HandleScope before calling callbacks
This commit is contained in:
parent
938c7fb2f4
commit
5198a5bf4b
@ -16,6 +16,8 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include <nan.h>
|
||||||
|
|
||||||
#include "impl/weak_realm_notifier.hpp"
|
#include "impl/weak_realm_notifier.hpp"
|
||||||
|
|
||||||
#include "shared_realm.hpp"
|
#include "shared_realm.hpp"
|
||||||
@ -35,6 +37,8 @@ WeakRealmNotifier::WeakRealmNotifier(const std::shared_ptr<Realm>& realm, bool c
|
|||||||
auto realm = realm_weak_ptr->lock();
|
auto realm = realm_weak_ptr->lock();
|
||||||
|
|
||||||
if (realm) {
|
if (realm) {
|
||||||
|
// The v8::Local handles need a "scope" to be present or will crash.
|
||||||
|
Nan::HandleScope scope;
|
||||||
realm->notify();
|
realm->notify();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user