- Jul 25, 2013
-
-
Fedor Indutny authored
fix #5871
-
Fedor Indutny authored
If `obj` given to `cluster._getServer` has `_setServerData` or `_getServerData` methods, the data will be synchronized across workers and stored in master.
-
Ben Noordhuis authored
-
Ben Noordhuis authored
Increases the grep factor. Makes it easier to harmonize type checks across the code base.
-
Ben Noordhuis authored
If the same macro was used twice in close proximity, the second one didn't get expanded.
-
Ben Noordhuis authored
This incarnation of macros.py is only used to disable the (d)trace macros. Rename it so it better reflects its purpose. A new macros.py will be added in a follow-up commit.
-
Ben Noordhuis authored
-
Trevor Norris authored
Forgot to actually assign cb_info to the External in smalloc::Alloc() that accepts a callback to be run in the weak callback.
-
- Jul 24, 2013
-
-
Trevor Norris authored
Includes: * No need for `typeof` when checking undefined. * length is coerced to uint so no need to check if < 0. * Stay consistent and always throw `new` errors. * Returning offset + magic number in every write is error prone. Instead return the central write function which returns the correct offset.
-
Trevor Norris authored
In a rush to implement the fix 35e0d60d I overlooked the logic that causes 0-length buffer instantiation to automatically not assign the parent regardless.
-
- Jul 23, 2013
-
-
David Björklund authored
-
Trevor Norris authored
SlowBuffer(0) passes NULL instead of doing malloc(0). So when someone attempted to SlowBuffer(0).slice(0, 1) an assert would fail in smalloc::SliceOnto. It's important that the check go where it is because the resulting Buffer needs to have external array data allocated. In the case a user tries to slice a zero length Buffer it will also have NULL passed as the data argument. Also fixed where the .parent attribute was set for zero length Buffers. There is no need to track the source of slice if the slice isn't actually occurring.
-
isaacs authored
Closes #5860 In streams2, there is an "old mode" for compatibility. Once switched into this mode, there is no going back. With this change, there is a "flowing mode" and a "paused mode". If you add a data listener, then this will start the flow of data. However, hitting the `pause()` method will switch *back* into a non-flowing mode, where the `read()` method will pull data out. Every time `read()` returns a data chunk, it also emits a `data` event. In this way, a passive data listener can be added, and the stream passed off to some other reader, for use with progress bars and the like. There is no API change beyond this added flexibility.
-
Wyatt Preul authored
-
Ben Noordhuis authored
-
Trevor Norris authored
In v8 3.20.4 build/common.gypi was moved to build/toolchain.gypi and build/features.gypi.
-
Trevor Norris authored
-
- Jul 21, 2013
-
-
Ben Noordhuis authored
Just forward declare struct sockaddr, the struct is never actually dereferenced in src/node_internals.h. Before this commit, it included sys/socket.h but that header doesn't exist on Windows.
-
- Jul 20, 2013
-
-
Ben Noordhuis authored
-
Ben Noordhuis authored
-
Ben Noordhuis authored
Libuv now returns errors directly. Make everything in src/ and lib/ follow suit. The changes to lib/ are not strictly necessary but they remove the need for the abominations that are process._errno and node::SetErrno().
-
Ben Noordhuis authored
-
Ben Noordhuis authored
Exports: * all UV_E* error codes * a uv_err_name() binding
-
Ben Noordhuis authored
-
Ben Noordhuis authored
Prep work for removing process._errno. The handle.getsockname() function will return a status code in the future and set the address and port properties on the object that's passed in from JS land.
-
Ben Noordhuis authored
-
Trevor Norris authored
-
Ben Noordhuis authored
Commit 636ca7c6 adds an optimization that casts strong Persistent<T> handles directly to Local<T> handles to avoid the overhead of creating new HandleScope-rooted Local<T> handles all the time. One gotcha that I missed is that it's no longer legal to reference the Local<T> after calling Persistent<T>::Dispose(). This commit addresses that.
-
Ben Noordhuis authored
Helps catch bugs early on. Without it, V8 throws the fairly unhelpful exception "TypeError: undefined is not a function" - unhelpful because there is no stack trace.
-
Ben Noordhuis authored
-
Trevor Norris authored
It will be confusing if later on we add Buffer#dispose(), and smalloc is its own cpp api anyways. So instead create a new require('smalloc') to expose the previous Buffer.alloc/dispose methods, and expose copyOnto and kMaxLength as well. Other changes: * Added documentation and additional tests. * smalloc::CopyOnto has changed from using assert() to throwing errors on bad argument values because it is not exposed to the user. * Minor style fixes. -
Trevor Norris authored
For easier debugging it's helpful to always have the function name. These were not set for methods coming from cc.
-
- Jul 18, 2013
-
-
isaacs authored
Conflicts: doc/api/stream.markdown lib/tls.js
-
Shuan Wang authored
When using url.parse(), path and pathname usually return '/' when there is no path available. However when you have a protocol that contains non-lowercase letters and the input string does not have a trailing slash, both path and pathname will be undefined.
-
- Jul 17, 2013
-
-
isaacs authored
Provide more detailed explanation of the timing of `process.nextTick` relative to I/O.
-
isaacs authored
-
isaacs authored
The Streams API doc is now broken up into 3 sections: 1. API for Consumers 2. API for Implementors 3. Details and Extras This addresses one of the biggest points of confusion for new users who start to consume streams, and get the impression that they have to do lots of extra work and implement classes and such, just to get some data out of a file.
-
- Jul 16, 2013
-
-
Trevor Norris authored
In fa10b757 the assert to check if data == NULL was remove for smalloc::Alloc with no callback. It should have also been removed where a callback is accepted. No sense in making sure that length == 0 if data == NULL because devs already have to be responsible for checking that length is the same as the char* they're passing in.
-
- Jul 15, 2013
-
-
isaacs authored
-
- Jul 13, 2013
-
-
Ben Noordhuis authored
It hits a compiler bug in gcc <= 4.4 similar to the issue that was recently addressed in commit 157d2bcc: ../deps/v8/include/v8.h: In function ‘char* node::Buffer::Data(v8::Persistent&) [with TypeName = v8::Object]’: ../src/node_crypto.cc:1123: instantiated from here ../deps/v8/include/v8.h:876: error: ‘class v8::Data’ is not a function, ../src/node_internals.h:356: error: conflict with ‘template char* node::Buffer::Data(v8::Persistent&)’ ../src/node_internals.h:357: error: in call to ‘Data’ Remove the helper function, it was only used in a couple of places. Should fix the build on Ubuntu 10.04. Fixes #5844.
-