Merge remote-tracking branch 'ry/v0.10' into master
authorisaacs <i@izs.me>
Thu, 21 Mar 2013 17:52:01 +0000 (10:52 -0700)
committerisaacs <i@izs.me>
Thu, 21 Mar 2013 17:52:01 +0000 (10:52 -0700)
Conflicts:
src/node.cc
src/node_version.h

1  2 
deps/v8/src/platform-posix.cc
doc/api/fs.markdown
lib/crypto.js
lib/fs.js
src/node.cc
src/tcp_wrap.cc
src/tty_wrap.cc

Simple merge
@@@ -63,29 -63,14 +63,29 @@@ Relative path to filename can be used, 
  relative to `process.cwd()`.
  
  Most fs functions let you omit the callback argument. If you do, a default
 -callback is used that ignores errors, but prints a deprecation
 -warning.
 -
 -**IMPORTANT**: Omitting the callback is deprecated.  v0.12 will throw the
 -errors as exceptions.
 +callback is used that rethrows errors. To get a trace to the original call
 +site, set the NODE_DEBUG environment variable:
 +
 +    $ cat script.js
 +    function bad() {
 +      require('fs').readFile('/');
 +    }
 +    bad();
 +
 +    $ env NODE_DEBUG=fs node script.js
 +    fs.js:66
 +            throw err;
 +                  ^
 +    Error: EISDIR, read
 +        at rethrow (fs.js:61:21)
 +        at maybeCallback (fs.js:79:42)
 +        at Object.fs.readFile (fs.js:153:18)
 +        at bad (/path/to/script.js:2:17)
 +        at Object.<anonymous> (/path/to/script.js:5:1)
 +        <etc.>
  
  
- ## fs.rename(oldPath, newPath, [callback])
+ ## fs.rename(oldPath, newPath, callback)
  
  Asynchronous rename(2). No arguments other than a possible exception are given
  to the completion callback.
diff --cc lib/crypto.js
Simple merge
diff --cc lib/fs.js
Simple merge
diff --cc src/node.cc
@@@ -1025,10 -1018,27 +1018,27 @@@ MakeCallback(const Handle<Object> objec
  
    if (try_catch.HasCaught()) {
      FatalException(try_catch);
 -    return Undefined();
 +    return Undefined(node_isolate);
    }
  
-   return scope.Close(ret);
+   return ret;
+ }
+ Handle<Value>
+ MakeCallback(const Handle<Object> object,
+              const Handle<String> symbol,
+              int argc,
+              Handle<Value> argv[]) {
 -  HandleScope scope;
++  HandleScope scope(node_isolate);
+   Local<Function> callback = object->Get(symbol).As<Function>();
+   Local<Value> domain = object->Get(domain_symbol);
+   // has domain, off with you
+   if (!domain->IsNull() && !domain->IsUndefined())
+     return scope.Close(MakeDomainCallback(object, callback, argc, argv));
+   return scope.Close(MakeCallback(object, callback, argc, argv));
  }
  
  
diff --cc src/tcp_wrap.cc
@@@ -256,8 -257,17 +257,17 @@@ Handle<Value> TCPWrap::SetSimultaneousA
  #endif
  
  
+ Handle<Value> TCPWrap::Open(const Arguments& args) {
+   HandleScope scope;
+   UNWRAP(TCPWrap)
+   int fd = args[0]->IntegerValue();
+   uv_tcp_open(&wrap->handle_, fd);
+   return Null();
+ }
  Handle<Value> TCPWrap::Bind(const Arguments& args) {
 -  HandleScope scope;
 +  HandleScope scope(node_isolate);
  
    UNWRAP(TCPWrap)
  
diff --cc src/tty_wrap.cc
Simple merge