Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cares: Set process._errno, not global.errno

This makes test-internet pass
  • Loading branch information...
commit 7c2c9c3a784d0c9df4da3902bbfbac2be822dc36 1 parent 323120b
Isaac Z. Schlueter authored
6 src/cares_wrap.cc
@@ -261,9 +261,9 @@ static const char* AresErrnoString(int errorno) {
261 261
262 262 static void SetAresErrno(int errorno) {
263 263 HandleScope scope;
264   - Handle<Value> key = String::NewSymbol("errno");
265   - Handle<Value> value = String::NewSymbol(AresErrnoString(errorno));
266   - Context::GetCurrent()->Global()->Set(key, value);
  264 + Local<Value> key = String::NewSymbol("_errno");
  265 + Local<Value> value = String::NewSymbol(AresErrnoString(errorno));
  266 + node::process->Set(key, value);
267 267 }
268 268
269 269
4 src/node.cc
@@ -99,7 +99,9 @@ ngx_queue_t req_wrap_queue = { &req_wrap_queue, &req_wrap_queue };
99 99 Persistent<String> process_symbol;
100 100 Persistent<String> domain_symbol;
101 101
102   -static Persistent<Object> process;
  102 +// declared in node_internals.h
  103 +Persistent<Object> process;
  104 +
103 105 static Persistent<Function> process_tickDomainCallback;
104 106 static Persistent<Function> process_tickFromSpinner;
105 107 static Persistent<Function> process_tickCallback;
3  src/node_internals.h
@@ -31,6 +31,9 @@ namespace node {
31 31 // Defined in node.cc
32 32 extern v8::Isolate* node_isolate;
33 33
  34 +// Defined in node.cc at startup.
  35 +extern v8::Persistent<v8::Object> process;
  36 +
34 37 #ifdef _WIN32
35 38 // emulate snprintf() on windows, _snprintf() doesn't zero-terminate the buffer
36 39 // on overflow...

0 comments on commit 7c2c9c3

Please sign in to comment.
Something went wrong with that request. Please try again.