Browse Source

use efence again

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
b8c3d715fd
  1. 17
      src/node_object_wrap.h
  2. 6
      wscript

17
src/node_object_wrap.h

@ -13,10 +13,12 @@ class ObjectWrap {
}
virtual ~ObjectWrap ( ) {
assert(handle_.IsNearDeath());
handle_->SetInternalField(0, v8::Undefined());
handle_.Dispose();
handle_.Clear();
if (!handle_.IsEmpty()) {
assert(handle_.IsNearDeath());
handle_->SetInternalField(0, v8::Undefined());
handle_.Dispose();
handle_.Clear();
}
}
protected:
@ -35,6 +37,11 @@ class ObjectWrap {
assert(handle->InternalFieldCount() > 0);
handle_ = v8::Persistent<v8::Object>::New(handle);
handle_->SetInternalField(0, v8::External::New(this));
MakeWeak();
}
inline void MakeWeak (void)
{
handle_.MakeWeak(this, WeakCallback);
}
@ -75,6 +82,8 @@ class ObjectWrap {
assert(value == obj->handle_);
if (obj->refs_ == 0) {
delete obj;
} else {
obj->MakeWeak();
}
}
};

6
wscript

@ -118,8 +118,8 @@ def configure(conf):
#if Options.options.debug:
# conf.check(lib='profiler', uselib_store='PROFILER')
#if Options.options.efence:
# conf.check(lib='efence', libpath=['/usr/lib', '/usr/local/lib'], uselib_store='EFENCE')
if Options.options.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"):
# 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.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}/bin'

Loading…
Cancel
Save