Commit Graph

8171 Commits (40b1c9a66d2d32673dec4ac5ec03f927dd33b32b)

Author SHA1 Message Date
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
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
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
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
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
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
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
Ben Noordhuis fa05e8a270 doc: implicit fs callbacks don't throw in v0.10
But they will in v0.12.

Re #5005.
2013-03-13 15:34:18 -07:00
Ben Noordhuis 7b7235a232 doc: add note on process.title max length
Fixes #5006.
2013-03-13 23:27:16 +01:00
Gil Pedersen 615d809ac6 stream: Never call decoder.end() multiple times
Fixes decoder.end() being called on every push(null). As the tls module
does this, corrupt stream data could potentially be added to the end.
2013-03-13 15:20:13 -07:00
isaacs 110cacd1ed core: Move UNWRAP_NO_ABORT to handle_wrap.h
Otherwise it cannot be used in StreamWrap.

Forgot to include in last patch, broke the build.
2013-03-13 11:26:36 -07:00
Ben Noordhuis 9af0085f70 doc: path.join() arguments must be strings
In v0.8, non-string arguments were ignored. v0.10 throws an exception.
2013-03-13 18:42:04 +01:00
Fedor Indutny 8135ac1b7f net: handle 'finish' event only after 'connect' 2013-03-13 10:27:23 -07:00
isaacs 53f2381455 core: Unwrap without aborting in handle fd getter 2013-03-13 10:16:26 -07:00
isaacs 7a07b31a2f blog: Fix typo in typo fix 2013-03-13 10:15:30 -07:00
Fedor Indutny 26dae9a22a net: handle 'finish' event only after 'connect' 2013-03-13 17:24:58 +04:00
Nathan Rajlich 598b5e4593 blog: fix small typo in v0.10.0 release article 2013-03-12 19:00:48 -07:00
Nathan Rajlich 3288bc9532 doc: fix inpect() -> inspect() typo 2013-03-12 15:59:10 -07:00
Fedor Indutny 68487a73f2 crypto: replace BIO_free with BIO_free_all
From OpenSSL's documentation:

"If BIO_free() is called on a BIO chain it will only free one BIO
resulting in a memory leak."

and

"BIO_free_all() frees up an entire BIO chain, it does not halt if an
error occurs freeing up an individual BIO in the chain"
2013-03-13 00:23:29 +04:00
Fedor Indutny 7845918227 crypto: refactor crypto classes 2013-03-13 00:23:29 +04:00
Fedor Indutny 83d17e509f crypto: merge Cipher and Decipher 2013-03-13 00:23:29 +04:00
Fedor Indutny a15cc93ae3 crypto: split crypto classes 2013-03-13 00:23:29 +04:00
Nathan Rajlich 66280de133 util: custom `inspect()` method may return an Object
This is more like how `JSON.stringify()` works.
Closes #2711.
2013-03-12 13:18:16 -07:00
Nathan Rajlich da8b0eefde console: `console.dir()` bypasses inspect() methods
Use the `customInspect: false` option of `util.inspect()` to bypass any custom
inspect() function on the object being logged.

Closes #2717.
2013-03-12 13:15:03 -07:00
Ben Noordhuis da10bb85ff doc: events: add 'removeListener' event section
Amends commit 84221fd by (also) documenting the 'removeListener' event
in a dedicated section, like the 'newListener' event.

Fixes #4977.
2013-03-12 00:07:18 +01:00
isaacs 228ad9357c blog: Post about v0.10.0 2013-03-11 10:19:19 -07:00
isaacs e2b293c360 Now working on 0.10.1 2013-03-11 08:49:33 -07:00
isaacs dcfb6d8286 Merge branch 'v0.10.0-release' into v0.10 2013-03-11 08:49:20 -07:00
isaacs 163ca27423 2013.03.11, Version 0.10.0 (Stable)
* npm: Upgrade to 1.2.14

* core: Append filename properly in dlopen on windows (isaacs)

* zlib: Manage flush flags appropriately (isaacs)

* domains: Handle errors thrown in nested error handlers (isaacs)

* buffer: Strip high bits when converting to ascii (Ben Noordhuis)

* win/msi: Enable modify and repair (Bert Belder)

* win/msi: Add feature selection for various node parts (Bert Belder)

* win/msi: use consistent registry key paths (Bert Belder)

* child_process: support sending dgram socket (Andreas Madsen)

* fs: Raise EISDIR on Windows when calling fs.read/write on a dir (isaacs)

* unix: fix strict aliasing warnings, macro-ify functions (Ben Noordhuis)

* unix: honor UV_THREADPOOL_SIZE environment var (Ben Noordhuis)

* win/tty: fix typo in color attributes enumeration (Bert Belder)

* win/tty: don't touch insert mode or quick edit mode (Bert Belder)
2013-03-10 17:36:28 -07:00
isaacs 327b6e3e1d stream: Don't emit 'end' unless read() called
This solves the problem of calling `readable.pipe(writable)` after the
readable stream has already emitted 'end', as often is the case when
writing simple HTTP proxies.

The spirit of streams2 is that things will work properly, even if you
don't set them up right away on the first tick.

This approach breaks down, however, because pipe()ing from an ended
readable will just do nothing.  No more data will ever arrive, and the
writable will hang open forever never being ended.

However, that does not solve the case of adding a `on('end')` listener
after the stream has received the EOF chunk, if it was the first chunk
received (and thus, length was 0, and 'end' got emitted).  So, with
this, we defer the 'end' event emission until the read() function is
called.

Also, in pipe(), if the source has emitted 'end' already, we call the
cleanup/onend function on nextTick.  Piping from an already-ended stream
is thus the same as piping from a stream that is in the process of
ending.

Updates many tests that were relying on 'end' coming immediately, even
though they never read() from the req.

Fix #4942
2013-03-10 11:08:22 -07:00
isaacs cd2b9f542c stream: Avoid nextTick warning filling read buffer
In the function that pre-emptively fills the Readable queue, it relies
on a recursion through:

stream.push(chunk) ->
maybeReadMore(stream, state) ->
  if (not reading more and < hwm) stream.read(0) ->
stream._read() ->
stream.push(chunk) -> repeat.

Since this was only calling read() a single time, and then relying on a
future nextTick to collect more data, it ends up causing a nextTick
recursion error (and potentially a RangeError, even) if you have a very
high highWaterMark, and are getting very small chunks pushed
synchronously in _read (as happens with TLS, or many simple test
streams).

This change implements a new approach, so that read(0) is called
repeatedly as long as it is effective (that is, the length keeps
increasing), and thus quickly fills up the buffer for streams such as
these, without any stacks overflowing.
2013-03-10 11:04:48 -07:00
Julian Gruber 738347b904 events: Handle missing error obj when domains in use
so `ee.emit('error')` doesn't throw when domains are active

create an empty error only when handled by a domain

test for when no error is provided to an error event
2013-03-10 09:53:24 -07:00
koichik c9a4ec9c63 http: ServerRequest does not timeout after 'end'
Fixes #4967
2013-03-10 20:14:43 +09:00