Merge remote-tracking branch 'ry/v0.8'
authorisaacs <i@izs.me>
Fri, 3 Aug 2012 23:23:14 +0000 (16:23 -0700)
committerisaacs <i@izs.me>
Fri, 3 Aug 2012 23:23:14 +0000 (16:23 -0700)
Conflicts:
ChangeLog
deps/uv/src/unix/sunos.c
deps/uv/test/test-tcp-unexpected-read.c
src/node_version.h

1  2 
AUTHORS
ChangeLog
deps/uv/include/uv-private/uv-unix.h
deps/uv/include/uv.h
deps/uv/src/unix/thread.c
deps/uv/test/test-list.h
deps/uv/test/test-tcp-unexpected-read.c
lib/net.js
src/node.cc
src/node.h
src/node.js

diff --cc AUTHORS
+++ b/AUTHORS
@@@ -350,5 -350,6 +350,7 @@@ Ivan Torres <mexpolk@gmail.com
  Philipp Hagemeister <phihag@phihag.de>
  George Shank <shankga@gmail.com>
  Mike Morearty <mike@morearty.com>
 +Pavel Lang <langpavel@phpskelet.org>
  Peter Rybin <peter.rybin@gmail.com>
+ Eugen Dueck <eugen@dueck.org>
+ Gil Pedersen <git@gpost.dk>
diff --cc ChangeLog
+++ b/ChangeLog
@@@ -1,27 -1,41 +1,64 @@@
- 2012.07.25, Version 0.8.4 (Stable)
 +2012.07.20, Version 0.9.0 (Unstable)
 +
 +* punycode: update to v1.1.1 (Mathias Bynens)
 +
 +* c-ares: upgrade to 1.9.0 (Saúl Ibarra Corretgé)
 +
 +* dns: ignore rogue DNS servers reported by windows (Saúl Ibarra Corretgé)
 +
 +* unix: speed up uv_async_send() (Ben Noordhuis)
 +
 +* darwin: get cpu model correctly on mac (Xidorn Quan)
 +
 +* nextTick: Handle tick callbacks before any other I/O (isaacs)
 +
 +* Enable color customization of `util.inspect` (Pavel Lang)
 +
 +* tls: Speed and memory improvements (Fedor Indutny)
 +
 +* readline: Use one history item for reentered line (Vladimir Beloborodov)
 +
 +* Fix #3521 Make process.env more like a regular Object (isaacs)
 +
 +
+ 2012.08.02, Version 0.8.5 (Stable)
+ * node: tag Encode and friends NODE_EXTERN (Ben Noordhuis)
+ * fs: fix ReadStream / WriteStream missing callback (Gil Pedersen)
+ * fs: fix readFileSync("/proc/cpuinfo") regression (Ben Noordhuis)
+ * installer: don't assume bash is installed (Ben Noordhuis)
+ * Report errors properly from --eval and stdin (isaacs)
+ * assert: fix throws() throws an error without message property (koichik)
+ * cluster: fix libuv assert in net.listen() (Ben Noordhuis)
+ * build: always link sunos builds with libumem (Trent Mick)
+ * build: improve armv7 / hard-float detection (Adam Malcontenti-Wilson)
+ * https: Use host header as effective servername (isaacs)
+ * sunos: work around OS bug to prevent fs.watch() from spinning (Bryan Cantrill)
+ * linux: fix 'two watchers, one path' segfault (Ben Noordhuis)
+ * windows: fix memory leaks in many fs functions (Bert Belder)
+ * windows: don't allow directories to be opened for writing/appending (Bert Belder)
+ * windows: make fork() work even when not all stdio handles are valid (Bert Belder)
+ * windows: make unlink() not remove mount points, and improve performance (Bert Belder)
+ * build: Sign pkg installer for OS X (isaacs)
+ 2012.07.25, Version 0.8.4 (Stable), f98562fcd7d1cab573ca4dc1612157d6999befd4
  
  * V8: Upgrade to 3.11.10.17
  
Simple merge
Simple merge
Simple merge
Simple merge
index 0000000,45559c0..7adb4da
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,113 +1,111 @@@
 -  /* Satisfy the compiler. */
 -  return uv_buf_init(NULL, 0);
+ /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+  *
+  * Permission is hereby granted, free of charge, to any person obtaining a copy
+  * of this software and associated documentation files (the "Software"), to
+  * deal in the Software without restriction, including without limitation the
+  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+  * sell copies of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be included in
+  * all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+  * IN THE SOFTWARE.
+  */
+ #include "uv.h"
+ #include "task.h"
+ static uv_check_t check_handle;
+ static uv_timer_t timer_handle;
+ static uv_tcp_t server_handle;
+ static uv_tcp_t client_handle;
+ static uv_tcp_t peer_handle;
+ static uv_write_t write_req;
+ static uv_connect_t connect_req;
+ static unsigned long ticks; /* event loop ticks */
+ static void check_cb(uv_check_t* handle, int status) {
+   ticks++;
+ }
+ static void timer_cb(uv_timer_t* handle, int status) {
+   uv_close((uv_handle_t*) &check_handle, NULL);
+   uv_close((uv_handle_t*) &timer_handle, NULL);
+   uv_close((uv_handle_t*) &server_handle, NULL);
+   uv_close((uv_handle_t*) &client_handle, NULL);
+   uv_close((uv_handle_t*) &peer_handle, NULL);
+ }
+ static uv_buf_t alloc_cb(uv_handle_t* handle, size_t suggested_size) {
+   ASSERT(0 && "alloc_cb should not have been called");
+ }
+ static void read_cb(uv_stream_t* handle, ssize_t nread, uv_buf_t buf) {
+   ASSERT(0 && "read_cb should not have been called");
+ }
+ static void connect_cb(uv_connect_t* req, int status) {
+   ASSERT(req->handle == (uv_stream_t*) &client_handle);
+   ASSERT(0 == status);
+ }
+ static void write_cb(uv_write_t* req, int status) {
+   ASSERT(req->handle == (uv_stream_t*) &peer_handle);
+   ASSERT(0 == status);
+ }
+ static void connection_cb(uv_stream_t* handle, int status) {
+   uv_buf_t buf;
+   buf = uv_buf_init("PING", 4);
+   ASSERT(0 == status);
+   ASSERT(0 == uv_tcp_init(uv_default_loop(), &peer_handle));
+   ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle));
+   ASSERT(0 == uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb));
+   ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &peer_handle,
+                        &buf, 1, write_cb));
+ }
+ TEST_IMPL(tcp_unexpected_read) {
+   struct sockaddr_in addr;
+   uv_loop_t* loop;
+   addr = uv_ip4_addr("127.0.0.1", TEST_PORT);
+   loop = uv_default_loop();
+   ASSERT(0 == uv_timer_init(loop, &timer_handle));
+   ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1000, 0));
+   ASSERT(0 == uv_check_init(loop, &check_handle));
+   ASSERT(0 == uv_check_start(&check_handle, check_cb));
+   ASSERT(0 == uv_tcp_init(loop, &server_handle));
+   ASSERT(0 == uv_tcp_init(loop, &client_handle));
+   ASSERT(0 == uv_tcp_bind(&server_handle, addr));
+   ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb));
+   ASSERT(0 == uv_tcp_connect(&connect_req, &client_handle, addr, connect_cb));
+   ASSERT(0 == uv_run(loop));
+   /* This is somewhat inexact but the idea is that the event loop should not
+    * start busy looping when the server sends a message and the client isn't
+    * reading.
+    */
+   ASSERT(ticks <= 10);
+   return 0;
+ }
diff --cc lib/net.js
Simple merge
diff --cc src/node.cc
Simple merge
diff --cc src/node.h
Simple merge
diff --cc src/node.js
Simple merge