33 Commits
Author SHA1 Message Date
Felix Geisendörfer 066e97867a string_bytes: Guarantee valid utf-8 output
Previously v8's WriteUtf8 function would produce invalid utf-8 output
when encountering unmatched surrogate code units [1]. The new
REPLACE_INVALID_UTF8 option fixes that by replacing invalid code points
with the unicode replacement character.

[1]: JS Strings are defined as arrays of 16 bit unsigned integers. There
is no unicode enforcement, so one can easily end up with invalid unicode
code unit sequences inside a string.
2014-06-06 15:04:39 -07:00
Bert Belder 55ef9ef680 Revert "Check if a stream has a valid fd before read_start"
uv_stream_t.fd is a private field which exists only on unix.
This reverts commit 8d5c1201f2.
2012-06-16 20:14:21 +02:00
Karl Skomski 8d5c1201f2 Check if a stream has a valid fd before read_start
Closes #3118
2012-06-16 09:00:20 -07:00
Ben Noordhuis 27061cc9f4 udp_wrap, stream_wrap: lazy init slab allocator
Create slab allocator when binding is initialized.

Add an AtExit handler to destroy the slab before the VM shuts down, it can't be
disposed when V8 is dead and Valgrind will complain about memory leaks.
2012-06-05 16:48:17 +02:00
Oleg Efimov 45de259b43 Make UNWRAP macro generic. 2012-05-21 23:29:06 +02:00
Ben Noordhuis 7d2e68fdbd stream_wrap: fix compilation errors 2012-05-09 06:06:42 +02:00
Bert Belder 4624cf1214 stream_wrap.cc: fix typo 2012-05-09 04:34:41 +02:00
Bert Belder 726ebad9bc StreamWrap::WriteBuffer: remove superfluous arguments 2012-05-09 04:00:02 +02:00
Bert Belder 0e57aafbb1 Optimize writing strings with Socket.write 2012-05-09 03:56:19 +02:00
isaacs a26bee8fa1 MakeCallback: Consistent symbol usage 2012-04-17 13:14:54 -07:00
Bert Belder 3ec84a11f8 Slab allocator: don't attempt to shrink a non-buffer 2012-04-11 22:02:12 +02:00
Ben Noordhuis 1e13a2d242 stream_wrap: use new slab allocator 2012-03-30 21:24:02 +02:00
Ben Noordhuis 0f0557d78d stream_wrap: fix signedness compiler warnings 2012-03-30 14:52:38 +02:00
Ben Noordhuis ff4a9d381d core: use proper #include directives 2012-03-10 00:14:14 +01:00
Ben Noordhuis 296b7a580b cluster: support passing of named pipes
Fixes triggered assertion:

  Assertion failed: (0 && "bad address family"), function GetPeerName,
  file ../src/tcp_wrap.cc, line 237.

Fixes #2870.
2012-03-09 09:42:13 -08:00
Ben Noordhuis 74a8215a86 Revert support for isolates.
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.

Hence, this commit backs out all isolates-related changes.

Good bye, isolates. We hardly knew ye.
2012-02-06 15:44:42 +01:00
Fedor Indutny 9e6957b0a5 Merge branch 'v0.6'
Conflicts:
	src/handle_wrap.cc
	src/node_zlib.cc
	src/process_wrap.cc
2012-01-12 02:17:44 +06:00
Ryan Dahl e6a30bd107 Fix #2473
Tested in production.

See also http://code.google.com/p/v8/issues/detail?id=1889
2012-01-10 10:49:38 -08:00
Ryan Dahl 20ba454ef9 Add node::Loop() and don't inc node_isolate.h in *.cc
node::Loop() replaces the NODE_LOOP macro. This avoids hitting
v8::Isolate::GetCurrent() for each loop lookup when HAVE_ISOLATE==0
2011-12-29 01:56:11 +01:00
Ryan Dahl f168f7d702 Remove node_isolate.h from node.h 2011-12-29 01:56:10 +01:00
Ben Noordhuis 356992fe4d isolates: isolate-ify the main loop 2011-12-29 01:56:09 +01:00
Ryan Dahl e0a207c27a Begin moving static vars into struct for isolates.
Only node.cc, stream_wrap.cc, and tcp_wrap.cc have been done. The rest still
need work.
2011-12-07 01:14:54 -08:00
Ryan Dahl 60818b957c Add missing copyright headers 2011-11-02 10:00:57 -07:00
Ryan Dahl 6cc42927d8 Display sys_errno when UV_UNKNOWN is returned 2011-10-19 16:53:07 -07:00
Ryan Dahl 899358e797 Add test-child-process-fork2 and fixes to make it work 2011-10-07 04:03:47 -07:00
Ryan Dahl b413c77583 Support sending handles to other processes
Needs test.
2011-10-07 01:30:28 -07:00
Ryan Dahl 471c5701c3 uv_write2 uv_read2_start binding 2011-10-06 22:31:57 -07:00
Ryan Dahl 21cc4c4985 Upgrade libuv to ea4271f
Required adding uv_default_loop() in many places.
2011-08-31 01:53:30 -07:00
Ben Noordhuis 2aefea5a2f stream_wrap: update after libuv API change 2011-08-24 22:27:24 +02:00
Igor Zinkovsky 187fe27a6e stdio binding + javascript to enable process.stdin.listen() 2011-07-27 03:59:33 +02:00
Ryan Dahl 6050af4fd7 net_uv: properly initialize writeQueueSize
Fixes simple/test-tcp-wrap-listen.js
2011-07-19 02:19:27 -07:00
Ryan Dahl 0c7bf8132e Abstract out HandleWrap class 2011-07-18 04:22:16 -07:00
Ryan Dahl 1ae148909a Abstract StreamWrap from TCPWrap 2011-07-18 03:08:54 -07:00