diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-06-04 14:45:12 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-07-20 01:41:35 +0400 |
commit | d11e7c2075075aff7b6d1c39e46dfb69ff203315 (patch) | |
tree | 284a43d75477de96d6526084fa9284be1ea87816 /src/req_wrap.h | |
parent | 4a34c69cbf471f0c7f470a7fb2569f5ed06ee2cc (diff) |
src: ReqWrap now optionally accepts a wrap object
Diffstat (limited to 'src/req_wrap.h')
-rw-r--r-- | src/req_wrap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/req_wrap.h b/src/req_wrap.h index 93db63316f3..6dbf080a43b 100644 --- a/src/req_wrap.h +++ b/src/req_wrap.h @@ -34,9 +34,9 @@ extern QUEUE req_wrap_queue; template <typename T> class ReqWrap { public: - ReqWrap() { + ReqWrap(v8::Handle<v8::Object> object = v8::Handle<v8::Object>()) { v8::HandleScope scope(node_isolate); - v8::Local<v8::Object> object = v8::Object::New(); + if (object.IsEmpty()) object = v8::Object::New(); persistent().Reset(node_isolate, object); if (using_domains) { |