Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2013-04-10 02:31:22 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2013-04-11 01:51:17 +0400
commit8428b52e25fca440aa54a017a0b446f21f27c79a (patch)
tree2f6c6b597f192b966722325e6d97bca6d5881ccf /src/req_wrap.h
parentdeda899d774209def9936827f70c074f1cdf795f (diff)
req_wrap: only grab domain object if in use
Diffstat (limited to 'src/req_wrap.h')
-rw-r--r--src/req_wrap.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/req_wrap.h b/src/req_wrap.h
index 36e0fe56ce3..587111b415c 100644
--- a/src/req_wrap.h
+++ b/src/req_wrap.h
@@ -23,6 +23,7 @@
#define REQ_WRAP_H_
#include "ngx-queue.h"
+#include "node_internals.h"
namespace node {
@@ -38,15 +39,16 @@ class ReqWrap {
v8::HandleScope scope(node_isolate);
object_ = v8::Persistent<v8::Object>::New(node_isolate, v8::Object::New());
- v8::Local<v8::Value> domain = v8::Context::GetCurrent()
- ->Global()
- ->Get(process_symbol)
- ->ToObject()
- ->Get(domain_symbol);
+ if (using_domains) {
+ v8::Local<v8::Value> domain = v8::Context::GetCurrent()
+ ->Global()
+ ->Get(process_symbol)
+ ->ToObject()
+ ->Get(domain_symbol);
- if (!domain->IsUndefined()) {
- // fprintf(stderr, "setting domain on ReqWrap\n");
- object_->Set(domain_symbol, domain);
+ if (!domain->IsUndefined()) {
+ object_->Set(domain_symbol, domain);
+ }
}
ngx_queue_insert_tail(&req_wrap_queue, &req_wrap_queue_);