domains: properly check if domains are being used
authorTrevor Norris <trev.norris@gmail.com>
Tue, 6 Aug 2013 22:42:47 +0000 (15:42 -0700)
committerTrevor Norris <trev.norris@gmail.com>
Tue, 6 Aug 2013 22:42:47 +0000 (15:42 -0700)
process.domain is almost never just undefined, so it was setting the
object property unnecessarily.

src/req_wrap.h

index 794e4f3..eb73f06 100644 (file)
@@ -47,7 +47,7 @@ class ReqWrap {
                                     ->ToObject()
                                     ->Get(domain_symbol);
 
-      if (!domain->IsUndefined()) {
+      if (domain->IsObject()) {
         object->Set(domain_symbol, domain);
       }
     }