use efence again
This commit is contained in:
parent
ccd632f278
commit
b8c3d715fd
@ -13,10 +13,12 @@ class ObjectWrap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ObjectWrap ( ) {
|
virtual ~ObjectWrap ( ) {
|
||||||
assert(handle_.IsNearDeath());
|
if (!handle_.IsEmpty()) {
|
||||||
handle_->SetInternalField(0, v8::Undefined());
|
assert(handle_.IsNearDeath());
|
||||||
handle_.Dispose();
|
handle_->SetInternalField(0, v8::Undefined());
|
||||||
handle_.Clear();
|
handle_.Dispose();
|
||||||
|
handle_.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -35,6 +37,11 @@ class ObjectWrap {
|
|||||||
assert(handle->InternalFieldCount() > 0);
|
assert(handle->InternalFieldCount() > 0);
|
||||||
handle_ = v8::Persistent<v8::Object>::New(handle);
|
handle_ = v8::Persistent<v8::Object>::New(handle);
|
||||||
handle_->SetInternalField(0, v8::External::New(this));
|
handle_->SetInternalField(0, v8::External::New(this));
|
||||||
|
MakeWeak();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void MakeWeak (void)
|
||||||
|
{
|
||||||
handle_.MakeWeak(this, WeakCallback);
|
handle_.MakeWeak(this, WeakCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,6 +82,8 @@ class ObjectWrap {
|
|||||||
assert(value == obj->handle_);
|
assert(value == obj->handle_);
|
||||||
if (obj->refs_ == 0) {
|
if (obj->refs_ == 0) {
|
||||||
delete obj;
|
delete obj;
|
||||||
|
} else {
|
||||||
|
obj->MakeWeak();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
6
wscript
6
wscript
@ -118,8 +118,8 @@ def configure(conf):
|
|||||||
#if Options.options.debug:
|
#if Options.options.debug:
|
||||||
# conf.check(lib='profiler', uselib_store='PROFILER')
|
# conf.check(lib='profiler', uselib_store='PROFILER')
|
||||||
|
|
||||||
#if Options.options.efence:
|
if Options.options.efence:
|
||||||
# conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE')
|
conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE')
|
||||||
|
|
||||||
if not conf.check(lib="execinfo", libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"):
|
if not conf.check(lib="execinfo", libpath=['/usr/lib', '/usr/local/lib'], uselib_store="EXECINFO"):
|
||||||
# Note on Darwin/OS X: This will fail, but will still be used as the
|
# Note on Darwin/OS X: This will fail, but will still be used as the
|
||||||
@ -373,7 +373,7 @@ def build(bld):
|
|||||||
"""
|
"""
|
||||||
node.add_objects = 'ev eio evcom http_parser coupling'
|
node.add_objects = 'ev eio evcom http_parser coupling'
|
||||||
node.uselib_local = ''
|
node.uselib_local = ''
|
||||||
node.uselib = 'GNUTLS GPGERROR UDNS V8 EXECINFO DL KVM SOCKET NSL'
|
node.uselib = 'GNUTLS GPGERROR UDNS V8 EXECINFO DL KVM SOCKET NSL EFENCE'
|
||||||
|
|
||||||
node.install_path = '${PREFIX}/lib'
|
node.install_path = '${PREFIX}/lib'
|
||||||
node.install_path = '${PREFIX}/bin'
|
node.install_path = '${PREFIX}/bin'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user