Commit Graph

8653 Commits (f16edd2632930e3fbfead4d6d52eeac87824f1a6)

Author SHA1 Message Date
Fedor Indutny f16edd2632 fs: report correct path when EEXIST
When `symlink`, `link` or `rename` report EEXIST, ENOTEMPTY or EPERM -
the destination file name should be included in the error message,
instead of source file name.

fix #6510
2013-12-10 23:17:00 +04:00
Fedor Indutny 4a2792cd2f tls: emit 'end' on .receivedShutdown
NOTE: Also removed `.receivedShutdown` method of `Connection` it wasn't
documented anywhere, and was rewritten with `true` after receiving
`close_notify`.

fix #6638
2013-12-10 22:56:01 +04:00
Timothy J Fontaine 92bbd60a3f build: only whole archive on static v8 builds
Closes #6629
2013-12-10 10:11:28 -08:00
Timothy J Fontaine 2905884b63 build: pass --no-parallel by default to gyp
gyp by default now tries to process gyp files in parallel by using
python's multiprocessing module, but it has problems on oddball
platforms. We don't have many files or complex dependency chains that
would benefit from parallel processing so disable by deafult

fixes #6640
2013-12-06 21:07:46 -08:00
Timothy J Fontaine b5e161989c build: ./configure pass positional args to gyp
use `--` to specify the arguments you want to pass directly to gyp.

for example: `./configure -- --no-parallel -Dsome_define=foo`

fixes #6370
2013-12-06 21:07:00 -08:00
Yazhong Liu 5cfee927cd doc: mention execArgv in setupMaster 2013-12-06 10:45:40 -08:00
Fedor Indutny 796834bf18 doc: document 'error' event for stream.Writable
fix #5255
2013-12-06 10:26:49 -08:00
Kai Groner 98be8df571 crypto: Make Decipher._flush() emit errors.
When Decipher processes a stream using an incorrect key, the
DecipherFinal() method throws an unhandled exception at the end of the
stream.
2013-12-04 19:52:15 +04:00
isaacs b371d4ae8f blog: bnoordhuis departure 2013-12-04 01:00:07 -08:00
Fedor Indutny 60f777d343 tls: fix pool usage race
When calling `encOut` in loop, `maybeInitFinished()` may invoke
`clearOut`'s loop, leading to the writing of interleaved data
(encrypted and cleartext) into the one shared pool.

Move `maybeInitFinished()` out of the loop and add assertion for
future.
2013-12-02 15:18:04 -08:00
Yazhong Liu bd7fa92de4 doc: list execArgv option for child_process.fork() 2013-12-02 13:41:30 -08:00
Gabriel Falkenberg 94c4ba9dd3 doc: change constant to consistent 2013-12-02 13:31:23 -08:00
Sam Roberts 8aac118b69 process: document kill(0), disallow kill(O_RDWR)
The null signal test existed, but only tested the case where the target
process existed, not when it did not exist.

Also clarified that SIGUSR1 is reserved by Node.js only for receiveing,
its not at all reserved when sending a signal with kill().

kill(pid, 'O_RDWR'), or any other node constant, "worked". I fixed this
by also checking for 'SIG'. The same as done in the isSignal() function.
Now the signal names supported by process.kill() are the same as those
supported by process.on().
2013-12-02 10:41:37 -08:00
Fedor Indutny 9b8fcff435 tls: reset NPN callbacks after SNI
SNI callback selects a new SSL_CTX for the connection, which doesn't
have NPN callbacks set up.
2013-12-02 14:48:14 +04:00
Timothy J Fontaine 6877e64fa8 build: include postmortem symbols on linux
Previously we were building the symbols, but the linker was garbage
collecting the symbols because they weren't used. Inform the linker
that we want to keep all symbols from v8 around.
2013-12-01 18:57:43 -08:00
Yazhong Liu fcfaa392ae doc: net: fix typo in example code 2013-11-30 14:05:45 +01:00
Michael Ridgway a32b8787a4 doc: http: document ServerResponse 'finish' event 2013-11-28 22:35:25 +01:00
Nikolai Vavilov 207a3e10f8 doc: http: properly document callback argument 2013-11-28 22:31:11 +01:00
Ben Noordhuis 658aeb2ca0 stream_wrap: don't call Number::New()
Replace call to Number::New() with a call to Integer::NewFromUnsigned().

Profiling a Real World(TM) application with perf(1) suggests that the
conversion of its argument from integer to double is disproportionally
costly: over 60% of CPU cycles accountable to WriteStringImpl() are
attributable to the conversion.

After changing it to Integer::NewFromUnsigned(), WriteStringImpl()
has dropped from the 'most costly functions' top ten altogether.
2013-11-27 03:53:45 +01:00
isaacs 90655a998e blog: npm outage postmortem 2013-11-26 07:27:59 -08:00
Linus Unnebäck 953d7184ec doc: clarify child_process error behaviour
Clarify that an 'error' event may or may not be followed by an 'exit'
event and that it's not safe to make assumptions either way.
2013-11-23 15:46:50 +01:00
Jeremy Martin 71aabedad4 events: fix TypeError in removeAllListeners
Check that `listeners` is actually an array before trying to manipulate it
because it won't be if no regular event listeners have been registered yet
but there are 'removeListener' event listeners.
2013-11-22 17:42:34 +01:00
Timothy J Fontaine a34bbaf31b blog: Post for v0.11.9 2013-11-20 16:45:27 -08:00
isaacs c1452f4c6f npm: Upgrade to v1.3.15 2013-11-20 11:08:52 -08:00
Fedor Indutny 88dc1fcb62 crypto: `randomBytes` is non-blocking
Add NOTE section in documentation, mentioning that `randomBytes` won't
block when entropy sources are drained.

fix #6372
2013-11-19 13:15:50 +04:00
Fedor Indutny fce0eb416b events: do not accept NaN in setMaxListeners 2013-11-19 13:14:01 +04:00
Fedor Indutny 5885f464f0 net: fix `new net.Socket` documentation
`Socket` no longer accepts `type` option, and also accepts `readable`,
`writable` options.

fix #6541
2013-11-19 12:50:16 +04:00
Fedor Indutny 5ce50ece16 dgram: fix abort when getting `fd` of closed dgram
v8's `messages.js` file's `CallSiteGetMethodName` is running through all
object properties and getter to figure out method name of function that
appears in stack trace. This run-through will also read `fd` property of
`UDPWrap` instance's javascript object, making `UNWRAP()` fail.

As a simple alternative to the test case above, one could just keep
reference to the dgram handle and try accessing `handle.fd` after it has
been fully closed.

fix #6536
2013-11-19 12:44:06 +04:00
Ben Noordhuis 1394d5856b doc: add nodejs.vn to community page
Node.js.  It's not just for SF hipsters anymore.
2013-11-15 16:29:30 +01:00
Ben Noordhuis a763db8fc0 doc: sort community page links alphabetically
This commit introduces some long lines but it's HTML so it's okay.
2013-11-15 16:24:47 +01:00
Fedor Indutny 65b127572f tls: handle `ssl.start()` errors 2013-11-13 17:09:25 +04:00
Tim Wood c9d93f3431 events: don't call once twice
Emitting an event within a `EventEmitter#once` callback of the same
event name will cause subsequent `EventEmitter#once` listeners of the
same name to be called multiple times.

    var emitter = new EventEmitter();

    emitter.once('e', function() {
      emitter.emit('e');
      console.log(1);
    });

    emitter.once('e', function() {
      console.log(2);
    });

    emitter.emit('e');

    // Output
    // 2
    // 1
    // 2

Fix the issue, by calling the listener method only if it was not
already called.
2013-11-13 03:21:04 +04:00
Timothy J Fontaine ac9cf00252 blog: Post for v0.10.22 2013-11-12 12:53:45 -08:00
Timothy J Fontaine 9142dc676f Now working on 0.10.23 2013-11-12 12:53:45 -08:00
Timothy J Fontaine 36f2bf22b5 Merge branch 'v0.10.22-release' into v0.10 2013-11-12 12:53:28 -08:00
Timothy J Fontaine cbff8f091c 2013.11.12, Version 0.10.22 (Stable)
* npm: Upgrade to 1.3.14

* uv: Upgrade to v0.10.19

* child_process: don't assert on stale file descriptor events (Fedor Indutny)

* darwin: Fix "Not Responding" in Mavericks activity monitor (Fedor Indutny)

* debugger: Fix bug in sb() with unnamed script (Maxim Bogushevich)

* repl: do not insert duplicates into completions (Maciej Małecki)

* src: Fix memory leak on closed handles (Timothy J Fontaine)

* tls: prevent stalls by using read(0) (Fedor Indutny)

* v8: use correct timezone information on Solaris (Maciej Małecki)
2013-11-12 12:22:12 -08:00
Timothy J Fontaine 16934d9210 src: add HandleScope in HandleWrap::OnClose
Fixes a 4 byte leak on handles closing. AKA The Walmart leak.

MakeCallback doesn't have a HandleScope. That means the callers scope
will retain ownership of created handles from MakeCallback and related.
There is by default a wrapping HandleScope before uv_run, if the caller
doesn't have a HandleScope on the stack the global will take ownership
which won't be reaped until the uv loop exits.

If a uv callback is fired, and there is no enclosing HandleScope in the
cb, you will appear to leak 4-bytes for every invocation. Take heed.

cc @hueniverse
2013-11-12 11:23:19 -08:00
Timothy J Fontaine ac799ba0af uv: Upgrade to v0.10.19 2013-11-12 10:57:57 -08:00
yangguo@chromium.org 007393a09d v8: use correct timezone information on Solaris
`timezone` variable contains the difference, in seconds, between UTC and
local standard time (see `man 3 localtime` on Solaris).

Call to `tzset` is required to apply contents of `TZ` variable to
`timezone` variable.

BUG=v8:2064

Review URL: https://chromiumcodereview.appspot.com/10967066
Patch from Maciej Małecki <me@mmalecki.com>.

This is a back-port of upstream commit r12802 and a forward port of
commit 9fa953d from the v0.8 branch.  V8 3.22 in the master branch
contains the patch so no further forward-porting is necessary.
2013-11-12 15:15:32 +01:00
Maciej Małecki 568072ceae repl: do not insert duplicates into completions
Fix invalid `hasOwnProperty` function usage.

For example, before in the REPL:

```
> Ar<Tab>
Array

Array        ArrayBuffer
```

Now:

```
> Ar<Tab>
Array

ArrayBuffer
```

Fixes #6255.
Closes #6498.
2013-11-11 15:45:09 -08:00
Timothy J Fontaine 2010985354 gyp: update to bebdcea 2013-11-10 15:15:34 -08:00
Ben Noordhuis 3dcc9b93e1 v8: unbreak `make native` build
The security fix from commit 6b92a713 also back-ported the test case.
Said test case relies on API that is only available in newer versions
of V8 and, as a result, broke the `make native` and `make <arch.mode>`
builds.  This commit reverts that part of the back-port.  Fixes the
following build error:

  ../test/cctest/test-api.cc: In function ‘void TestRegress260106()’:
  ../test/cctest/test-api.cc:17712:34: error: ‘class v8::Context’ has
  no member named ‘GetIsolate’
2013-11-09 22:27:22 +01:00
Fedor Indutny ac2263b77f tls: prevent stalls by using read(0)
Do not `.push()` the same data as just passed to `.ondata()`, it
may be read by 'data' event listeners.

fix #6277
2013-11-09 02:07:36 +04:00
isaacs 8f221bc43d npm: Upgrade to 1.3.14 2013-11-08 13:41:24 -08:00
Fedor Indutny 0be5a94c56 doc: encoding is ignored if input is a Buffer
NOTE: it wasn't in 0.8

fixes #6386
2013-11-07 11:02:19 -08:00
isaacs 849c92fec7 doc: Correct and add several items
Several names/urls were out of date, and some really
awesome stuff was missing.
2013-10-31 13:36:00 -07:00
Sam Roberts 155df9ca76 doc: document node signal handling
Partly lifted from uv.h, partly from observation of node.cc.
2013-10-31 21:19:04 +01:00
Timothy J Fontaine 9f7f9d1240 blog: Post for v0.11.8 2013-10-30 09:09:04 -07:00
Ben Noordhuis 0c5981b226 doc: dgram: reword dgram.Socket#send() docs
Make it clear that the address argument is not really optional and fix
some Engrish and long lines while we're here.

Fixes #6433.
2013-10-29 10:32:15 +01:00
isaacs 4b5e6a38df npm@1.3.13 2013-10-28 14:10:47 -07:00