mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-02 17:53:55 +00:00
Create a HandleScope before calling callbacks
This commit is contained in:
parent
2eacb66ac4
commit
5ecf13c261
@ -16,6 +16,8 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <nan.h>
|
||||
|
||||
#include "impl/weak_realm_notifier.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();
|
||||
|
||||
if (realm) {
|
||||
// The v8::Local handles need a "scope" to be present or will crash.
|
||||
Nan::HandleScope scope;
|
||||
realm->notify();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user