0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

8629 Commits

Author SHA1 Message Date
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
Phillip Alexander
977c54adb5 doc: fs: clarify fs.symlink Windows specific args 2013-10-27 21:02:19 +01:00
Ryan Graham
5ac6f4de13 doc: improve module documentation
Expands on when to use module.exports vs. exports. This is a recurring
question on mailing list and continues to confuse new devs.
2013-10-27 11:47:11 +01:00
Sam Roberts
a60f67192f doc: fix missing backtick in 2e16037 2013-10-25 23:40:46 +02:00
Brian White
21265e20d3 doc: streams: document default objectMode setting 2013-10-25 10:33:22 -07:00
Maxim Bogushevich
9c6e06bed3 debugger: Fix bug in sb() with unnamed script
setBreakpoint() cause error when unnamed script is loaded
2013-10-25 13:17:35 +04:00
isaacs
f6f176e108 npm@1.3.12 2013-10-24 09:22:13 -07:00
Ben Noordhuis
808a968409 build: fix test-gc weakref build rule
Make the build rule depend on the build artifact (weakref.node) itself
rather than the directory it's built in.  Depending on the directory
means that a build failure won't trigger a rebuild on the next
invocation because the directory's timestamp has been updated.

This is a back-port of commit 1189571 from the master branch that
hopefully fixes the following CI error:

    executing:  make test/gc/node_modules/weak/build/
    make: *** No rule to make target `test/gc/node_modules/weak/build/'.
    Command exited with non-zero: make test/gc/node_modules/weak/build/
    Build step 'Execute NodeJS script' marked build as failure
2013-10-24 16:31:31 +02:00
Zarko Stankovic
eb291de00e doc: add nodejs.rs to the community page 2013-10-24 16:17:56 +02:00
Ben Noordhuis
91a0e52c03 src: IsInt64() should return bool, not int 2013-10-23 13:26:25 +02:00
isaacs
97813ae58d blog: HTTP server DoS vulnerability details
CVE-2013-4450
2013-10-22 10:56:03 -07:00
Timothy J Fontaine
028e524bce blog: Post for v0.10.21 2013-10-18 15:46:02 -07:00
Timothy J Fontaine
2649ae8395 blog: Post for v0.8.26 2013-10-18 15:43:55 -07:00
Timothy J Fontaine
85b2aaea3d Now working on 0.10.22 2013-10-18 15:40:32 -07:00
Timothy J Fontaine
7940833773 Merge branch 'v0.10.21-release' into v0.10 2013-10-18 15:39:56 -07:00
Timothy J Fontaine
e2da042844 2013.10.18, Version 0.10.21 (Stable)
* uv: Upgrade to v0.10.18

* crypto: clear errors from verify failure (Timothy J Fontaine)

* dtrace: interpret two byte strings (Dave Pacheco)

* fs: fix fs.truncate() file content zeroing bug (Ben Noordhuis)

* http: provide backpressure for pipeline flood (isaacs)

* tls: fix premature connection termination (Ben Noordhuis)
2013-10-18 14:26:27 -07:00
Timothy J Fontaine
5e41c022af crypto: clear errors from verify failure
OpenSSL will push errors onto the stack when a verify fails, which can
disrupt TLS and other routines if we don't clear the error stack

Fixes #6304
2013-10-18 14:14:21 -07:00
Timothy J Fontaine
8fc48bcf4c uv: Upgrade to v0.10.18 2013-10-18 13:52:15 -07:00
isaacs
b97c28f59e http: provide backpressure for pipeline flood
If a client sends a lot more pipelined requests than we can handle, then
we need to provide backpressure so that the client knows to back off.
Do this by pausing both the stream and the parser itself when the
responses are not being read by the downstream client.

Backport of 085dd30
2013-10-16 17:12:34 -07:00
Timothy J Fontaine
f051b8919f http_parser: expose pause/resume method for parser 2013-10-16 17:12:34 -07:00
Sam Roberts
2e16037201 doc: cluster documentation cleanup and corrections
- fixed some incomprehensible wording ("event assigned to..."?)
- removed undocumented and unnecessary process properties from example
- corrected the docs on the default for the exec setting
- described when workers are removed from cluster.workers
- described addressType, which was documented as existing, but not what
  values it might have
- spell out more clearly the limitations of setupMaster
- describe disconnect in sufficient detail that why a child does or does
  not exit can be understood
- clarify which cluster functions and events are available on process or
  just on the worker, as well as which are not available in children,
- don't describe events as the same, when they have receive different
  arguments
- fix misleading disconnect example: since disconnect already calls
  close on all servers, doing it again in the example is a no-op, not
  the "force close" it was claimed to be
- document the error event, not catching it will kill your node
- describe suicide better, it is important, and a bit unintuitive
  (process.exit() is not suicide?)
- use worker consistently throughout, instead of child.
2013-10-16 15:10:13 -07:00
Sam Roberts
ed186c971c doc: child_process corrections and cleanups
- Make explicit that .disconnected is set before the disconnect event,
  and it is not allowed to send messages after calling .disconnect(),
  even while waiting for a delayed disconect event.
- Remove obsolete claim that explicit exit is required
- Describe silent: in the options for fork()
- Describe .connected as the property it is, not just as an aside in
  the disconnect() method
2013-10-16 15:10:13 -07:00
Ben Noordhuis
5bc5210b92 doc: http: reword IncomingMessage 'close' event
The bit that says "before response.end() was called or able to flush"
doesn't apply to incoming streams.

Fixes #6359.
2013-10-16 12:56:13 +02:00
Ben Noordhuis
5ef03bc3ee doc: http: add cross-links for easier clicking
Make it a little easier to navigate the http module documentation by
turning class names and methods into links to the appropriate section.
2013-10-16 12:56:03 +02:00
Ben Noordhuis
9a3a0ccc50 doc: expand os.loadavg() section
Add a short explanation of what the load average is and why it's
unavailable on Windows.

Also sneak in a fix for a typo that I introduced in commit 56c5806.
2013-10-15 10:17:23 +02:00