mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 23:04:29 +00:00
Address some issues in WeakRealmNotifier for Node
This commit is contained in:
parent
7829cb5f33
commit
560e725398
@ -17,6 +17,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <nan.h>
|
#include <nan.h>
|
||||||
|
#include <uv.h>
|
||||||
|
|
||||||
#include "impl/weak_realm_notifier.hpp"
|
#include "impl/weak_realm_notifier.hpp"
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ WeakRealmNotifier::WeakRealmNotifier(const std::shared_ptr<Realm>& realm, bool c
|
|||||||
|
|
||||||
WeakRealmNotifier::WeakRealmNotifier(WeakRealmNotifier&& rgt)
|
WeakRealmNotifier::WeakRealmNotifier(WeakRealmNotifier&& rgt)
|
||||||
: WeakRealmNotifierBase(std::move(rgt))
|
: WeakRealmNotifierBase(std::move(rgt))
|
||||||
|
, m_handle(rgt.m_handle)
|
||||||
{
|
{
|
||||||
rgt.m_handle = nullptr;
|
rgt.m_handle = nullptr;
|
||||||
}
|
}
|
||||||
@ -53,8 +55,7 @@ WeakRealmNotifier::WeakRealmNotifier(WeakRealmNotifier&& rgt)
|
|||||||
WeakRealmNotifier& WeakRealmNotifier::operator=(WeakRealmNotifier&& rgt)
|
WeakRealmNotifier& WeakRealmNotifier::operator=(WeakRealmNotifier&& rgt)
|
||||||
{
|
{
|
||||||
WeakRealmNotifierBase::operator=(std::move(rgt));
|
WeakRealmNotifierBase::operator=(std::move(rgt));
|
||||||
m_handle = rgt.m_handle;
|
std::swap(m_handle, rgt.m_handle);
|
||||||
rgt.m_handle = nullptr;
|
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <uv.h>
|
|
||||||
|
|
||||||
#include "impl/weak_realm_notifier_base.hpp"
|
#include "impl/weak_realm_notifier_base.hpp"
|
||||||
|
|
||||||
|
typedef struct uv_async_s uv_async_t;
|
||||||
|
|
||||||
namespace realm {
|
namespace realm {
|
||||||
class Realm;
|
class Realm;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user