Commit Graph

8447 Commits (aca275f58db0ce3da247b35588ebec563c7ba937)

Author SHA1 Message Date
isaacs 3dd7938c03 npm: upgrade to 1.2.15 2013-03-20 17:49:57 -07:00
Fedor Indutny 855caa82aa crypto: initialize transform lazily 2013-03-20 16:49:08 -07:00
isaacs 008ab12b7f tls: Prevent hang in readStart
This is not a great fix, and it's a bug that's very tricky to reproduce.

Occasionally, while downloading a file, especially on Linux for some
reason, the pause/resume timing will be just right such that the
CryptoStream is in a 'reading' state, but actually has no data, so it
ought to pull more in.  Because there's no reads happening, it just sits
there, and the process will exit

This is, fundamentally, a factor of how the HTTP implementation sits
atop CryptoStreams and TCP Socket objects, which is utterly horrible,
and needs to be rewritten.  However, in the meantime, npm downloads are
prematurely exiting, causing hard-to-debug "cb() never called!" errors.
2013-03-20 16:14:39 -07:00
Trevor Norris 31314b6978 bench: compare binaries equal times
The benchmark compare would drop the last run of the binary pairs. So
when they were only run once an error would arise because no data was
generated for the second binary.
2013-03-20 20:25:48 +01:00
Ben Noordhuis 3dac421393 bench: add dgram send/recv benchmark 2013-03-20 17:16:30 +01:00
Fedor Indutny 34e22b8ee7 tls: always reset this.ssl.error after handling
Otherwise assertion may happen:

    src/node_crypto.cc:962: void node::crypto::Connection::ClearError():
    Assertion `handle_->Get(String::New("error"))->BooleanValue() == false'
    failed.

See #5058
2013-03-20 17:58:01 +04:00
Fedor Indutny 40b1c9a66d v8: unbreak build on smartos after 831af97df2 2013-03-20 12:26:28 +04:00
Ben Noordhuis ad819bcc4b src: bump NODE_MODULE_VERSION after abi change 2013-03-20 01:56:29 +01:00
Ben Noordhuis dc29d64983 test: fix up weakref.cc after v8 api change 2013-03-20 01:53:34 +01:00
Raymond Feng 25eaacad9a fs: make write/appendFileSync correctly set file mode 2013-03-20 01:37:43 +01:00
Trevor Norris f65e14ed1d src: pass Isolate to all applicable api
Update the api to pass node_isolate to all supported methods.

Much thanks to Ben Noordhuis and his work in 51f6e6a.
2013-03-20 01:11:02 +01:00
Trevor Norris da4d79ac47 docs: show how to use Isolate
Part of the 3.17 update is to pass the isolate as an argument. The addon
docs have been updated with this usage.
2013-03-20 01:11:02 +01:00
Fedor Indutny 88217ec276 dtrace: fix generation of v8 constants on freebsd
Every constant is certainly 4 bytes now, but freebsd's objdump utility
prints out odd byte sequences (5-bytes, 6-bytes and even 9-bytes long)
for v8's data section. We can safely ignore all upper bytes, because all
constants that we're using are just `int`s. Since on all supported
platforms `int` is 32bit long (and anyway v8's constants are 32bit too),
we ignore all higher bits if they were read.
2013-03-20 01:11:02 +01:00
isaacs d9036a5d35 dtrace: More style
Continuation lines should be indented with 4 spaces, not a tab.
2013-03-20 01:11:02 +01:00
isaacs 425163e0d6 dtrace: Make D style more D-ish 2013-03-20 01:11:02 +01:00
Fedor Indutny 3375bd8db7 dtrace: x64 ustack helper 2013-03-20 01:11:02 +01:00
Fedor Indutny 3cb5bf1c0d dtrace: fix style in ustack helper 2013-03-20 01:11:02 +01:00
Trevor Norris 831af97df2 v8: revert dtrace fix from 3.14 downgrade
Revert "v8: fix postmortem and dtrace helper build"

This reverts commit aa98539277.
2013-03-20 01:11:01 +01:00
Bryan Cantrill 8bffa333d2 v8: loosen artificial mmap constraint
Fixes #4010.
2013-03-20 01:11:01 +01:00
Trevor Norris 0bba590283 bindings: update api
All compile time warnings about using deprecated APIs have been
suppressed by updating node's API. Though there are still many function
calls that can accept Isolate, and still need to be updated.

node_isolate had to be added as an extern variable in node.h and
node_object_wrap.h

Also a couple small fixes for Error handling.

Before v8 3.16.6 the error stack message was lazily written when it was
needed, which allowed you to change the message after instantiation.
Then the stack would be written with the new message the first time it
was accessed. Though that has changed. Now it creates the stack message
on instantiation. So setting a different message afterwards won't be
displayed.

This is not a complete fix for the problem. Getting error without any
message isn't very useful.
2013-03-20 01:11:01 +01:00
Trevor Norris 06bec0e087 v8: remove optimization switches
Remove compiler switches from $(TOPLEVEL)/deps/v8/build/common.gypi,
they are set globally in $(TOPLEVEL)/common.gypi.
2013-03-20 01:11:01 +01:00
Trevor Norris 83261e789e deps: update v8 to 3.17.13 2013-03-20 01:11:01 +01:00
Iskren Ivov Chernev 2f4a62c5e1 doc: fix streams2 SimpleProtocol example
A non-existing variable `b` was used to queue data for reading.
2013-03-20 00:34:31 +01:00
Bert Belder bf83251eea windows: enable watching signals with process.on('SIGXYZ')
This reverts commit ea1cba6246.

The offending commit was intended to land on the v0.8 branch only, but
it accidentally got merged at some point.

Closes #5054.
2013-03-20 00:16:02 +01:00
Bert Belder 8019800c56 Update .mailmap and AUTHORS 2013-03-19 20:07:38 +01:00
Scott Blomquist a05f973f82 test: Misc Windows unit test fixes
Fixes #5071, #5073.

* Normalize capitalization of drive letter
* Fix `exit()` typo in failure path
* Ignore symlink tests (Windows) if not elevated

The `test_relative_input_cwd()` test was failing on Windows when
`skipSymlinks` was `true`. So we won't run it if `skipSymlinks` is
`true`.

When it failed, the unhandled error caused Node to die before
having a chance to clean up, which resulted in two files missing
in subsequent unit tests:

 * `test/fixtures/nested-index/one/hello.js`
 * `test/fixtures/nested-index/one/index.js`

We should probably find a way to isolate this test from the other
test (`simple/test-module-loading`) that was failing when this test
poluted the disk state.
2013-03-19 09:38:11 -07:00
Ben Noordhuis 808b7ada07 doc: fix broken links in blog footer
The blog lives at blog.nodejs.org while the main website lives at
nodejs.org. Ergo, use absolute URLs for links to the main website.

Fixes #5062.
2013-03-18 14:41:51 +01:00
Fedor Indutny b5ddc0cf96 tls: write pending data of opposite side
Fix stucked CryptoStream behaviour, happening when one of the sides
locks-up in queued state.

fix #5023
2013-03-17 20:19:09 +04:00
Fedor Indutny 14a8fb8bbe tls: write pending data of opposite side
Fix stucked CryptoStream behaviour, happening when one of the sides
locks-up in queued state.

fix #5023
2013-03-17 20:17:29 +04:00
Trevor Norris a0867e1c93 node: revert removal of MakeCallback
In 0168109 an implementation of MakeCallback was accidently removed. It
has been re-added.
2013-03-17 13:45:34 +01:00
JeongHoon Byun f217b5ed62 doc: fix typo in crypto docs 2013-03-17 13:45:14 +01:00
Yi EungJun 852444a720 doc: https: Fix the link to tls.connect 2013-03-16 23:52:39 +01:00
Ben Noordhuis f5a337e09c deps: upgrade libuv to b45a74f 2013-03-16 23:32:42 +01:00
Ben Noordhuis 2b5bc8e0d6 install: don't install man page twice
Looks like a merge conflict in 77ed12f left in the old, unconditional
install rule. Remove it, the new and improved rule is a few lines down.

Fixes #5044.
2013-03-16 23:22:10 +01:00
Nao Iizuka 94284e7d2e readline: handle wide characters properly
Handle wide characters (such as あ, 谢, 고) as two column wide to make
cursor move properly.

Closes #555.
Closes #4994.
2013-03-15 16:18:30 -10:00
Timothy J Fontaine 4432dc8187 v8: move 32 bit heap hint on sunos
Setting the V8 heap at or near 0x20000000 on 32bit sunos only allows
512 MB of heap space, instead on sunos move this to 0x80000000.

Fixes #4010.
2013-03-15 01:31:05 +01:00
isaacs 14947b6c5e stream: Return self from readable.wrap
Also, set paused=false *before* calling resume().  Otherwise,
there's an edge case where an immediately-emitted chunk might make
it call pause() again incorrectly.
2013-03-14 16:43:19 -07:00
isaacs 3537b57f3e test: No need for kicking in streams2 test
This was necessary when we weren't auto-starting when a 'readable'
listener is added.
2013-03-14 16:18:42 -07:00
Gil Pedersen e8f80bf479 stream: Never call decoder.end() multiple times
Updated version that does what it says without assigning state.decoder.
2013-03-14 16:13:10 -07:00
isaacs c0721bcd66 repl: Use a domain to catch async errors safely
Fix #2031
2013-03-14 16:03:44 -07:00
Sami Samhuri 5eacdd4bf9 repl: emit 'reset' event when context is reset
Closes #1183.
2013-03-14 10:49:14 -10:00
koichik 1f53cfdeae doc: don't mark fs callbacks as optional
Refs #5005, #5008
2013-03-14 13:06:49 -07:00
isaacs d62cf59dc1 http: Don't hot-path end() for large buffers
The benefits of the hot-path optimization below start to fall off when
the buffer size gets up near 128KB, because the cost of the copy is more
than the cost of the extra write() call.  Switch to the write/end method
at that point.

Heuristics and magic numbers are awful, but slow http responses are
worse.

Fix #4975
2013-03-14 08:04:59 -07:00
Ben Noordhuis ca5022b8f1 net: improve arbitrary tcp socket support
Consider this example:

  // fd 3 is a bound tcp socket
  var s = net.createServer(cb);
  s.listen({ fd: 3 });
  console.log(s.address());  // prints null

This commit makes net.Server#address() print the actual address.

Ditto for non-listen sockets; properties like net.Socket#localAddress
and net.Socket#remoteAddress now return the correct value.

Fixes #5009.
2013-03-14 15:55:30 +01:00
Ben Noordhuis e99dff4617 deps: upgrade libuv to 7b66ea1 2013-03-14 15:55:26 +01:00
Adam Malcontenti-Wilson 028c630ecd doc: change dgram to socket for properties of dgram.Socket
Fixes #4919.
2013-03-14 12:55:19 +01:00
isaacs 5e140b33e5 Revert "fs: Missing cb errors are deprecated, not a throw"
This reverts commits 6bd8b7e540
and fa05e8a270.
2013-03-13 15:51:32 -07:00
isaacs 5917828622 Merge remote-tracking branch 'ry/v0.10'
Conflicts:
	src/node_version.h
2013-03-13 15:51:24 -07:00
isaacs 6399839c39 Revert "stream: Never call decoder.end() multiple times"
This reverts commit 615d809ac6.
2013-03-13 15:48:56 -07:00
isaacs 6bd8b7e540 fs: Missing cb errors are deprecated, not a throw
Commit a804347 makes fs function rethrow errors when the callback is
omitted. While the right thing to do, it's a change from the old v0.8
behavior where such errors were silently ignored.

To give users time to upgrade, temporarily disable that and replace it
with a function that warns once about the deprecated behavior.

Close #5005
2013-03-13 15:34:18 -07:00