summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-04-18src: don't set non-primitive values on templatesBen Noordhuis
V8 is going to disallow non-primitive values on v8::FunctionTemplate and v8::ObjectTemplate because those can't be shared across contexts. Fixes: https://github.com/nodejs/node/issues/6216 PR-URL: https://github.com/nodejs/node/pull/6228 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-15fs: optimize realpath using uv_fs_realpath()Yuval Brik
Remove realpath() and realpathSync() cache. Use the native uv_fs_realpath() which is faster then the JS implementation by a few orders of magnitude. PR-URL: https://github.com/nodejs/node/pull/3594 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-04-14src: add SIGINFO to supported signalsJames Reggio
Though not a POSIX signal, SIGINFO is supported by BSD systems (including Mac OS X) and is amongst the few signals that can be triggered in a terminal via a simple key combination (CTRL-T). On Linux, SIGINFO is an alias for SIGPWR; hence the defensive conditionals in src/node.cc. PR-URL: https://github.com/nodejs/node/pull/6093 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-12os: add userInfo() methodcjihrig
os.userInfo() calls libuv's uv_os_get_passwd() function. It returns an object containing the current effective user's username, uid, gid, shell, and home directory. On Windows, the uid and gid are -1, and the shell is null. Refs: https://github.com/nodejs/node/issues/5582 PR-URL: https://github.com/nodejs/node/pull/6104 Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-09src: fix -Wunused-variable compiler warningBen Noordhuis
Introduced in commit 7d8882b, "handle_wrap: expose an `isRefed()` check to JS". PR-URL: https://github.com/nodejs/node/pull/6129 Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-04-08buffer: add Buffer.prototype.compare by offsetJames M Snell
Adds additional `targetStart`, `targetEnd`, `sourceStart, and `sourceEnd` arguments to `Buffer.prototype.compare` to allow comparison of sub-ranges of two Buffers without requiring Buffer.prototype.slice() Fixes: https://github.com/nodejs/node/issues/521 PR-URL: https://github.com/nodejs/node/pull/5880 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-08buffer: standardize array index checkTrevor Norris
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an in32_t. This caused slight differences in error message reported in edge cases of argument parsing. Fixed by getting the IntegerValue() before checking if the value is < 0. Added test of API that was affected. PR-URL: https://github.com/nodejs/node/pull/6084 Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-07handle_wrap: expose an `isRefed()` check to JSJeremiah Senkpiel
This allows third-party tools to check whether or not a handle that can be unreferenced is unreferenced at a particular time. Notably, this should be helpful for inspection via AsyncWrap. Also, this is useful even to node's internals, particularly timers. Refs: https://github.com/nodejs/node/pull/5828 Refs: https://github.com/nodejs/node/pull/5827 PR-URL: https://github.com/nodejs/node/pull/5834 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-05zlib: detect gzip files when using unzip*Anna Henningsen
Detect whether a gzip file is being passed to `unzip*` by testing the first bytes for the gzip magic bytes, and setting the decompression mode to `GUNZIP` or `INFLATE` according to the result. This enables gzip-only features like multi-member support to be used together with the `unzip*` autodetection support and thereby makes `gunzip*` and `unzip*` return identical results for gzip input again. Add a simple test for checking that features specific to `zlib.gunzip`, notably support for multiple members, also work when using `zlib.unzip`. PR-URL: https://github.com/nodejs/node/pull/5884 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-05src: add missing 'inline' keywordsBen Noordhuis
The BaseObject constructor and destructor should not have external linkage because BaseObject is a header-only construct. Add the necessary 'inline' keywords. PR-URL: https://github.com/nodejs/node/pull/6056 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-05src: remove deprecated internal functionsBen Noordhuis
PR-URL: https://github.com/nodejs/node/pull/6053 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-05src: use size_t for http parser array size fieldsBen Noordhuis
Make the `num_values_` and `num_fields_` unsigned and remove an erroneous comment. PR-URL: https://github.com/nodejs/node/pull/5969 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-05src: replace ARRAY_SIZE with typesafe arraysizeBen Noordhuis
To prevent `ARRAY_SIZE(&arg)` (i.e., taking the array size of a pointer) from happening again. PR-URL: https://github.com/nodejs/node/pull/5969 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-05src: fix ARRAY_SIZE() logic errorBen Noordhuis
Bug introduced in commit 21d66d62 ("lib: remove bootstrap global context indirection"). PR-URL: https://github.com/nodejs/node/pull/5969 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-31tools: remove obsolete lint config fileRich Trott
All JS files have been moved out of the `src` directory so the `.eslintrc` file in that directory can also be removed. PR-URL: https://github.com/nodejs/node/pull/5959 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Klauke <romankl@users.noreply.github.com>
2016-03-31etw: add event messagesJoão Reis
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/nodejs/node/pull/5936
2016-03-31zlib: fix gzip member head/buffer boundary issueAnna Henningsen
Make sure that, even if an `inflate()` call only sees the first few bytes of a following gzip member, all members are decompressed and part of the full output. This change also modifies behaviour for trailing garbage: If there is trailing garbage which happens to start with the gzip magic bytes, it is no longer discarded but rather throws an error, since we cannot reliably tell random garbage from a valid gzip member anyway and have to try and decompress it. (Null byte padding is not affected, since it has been pointed out at various occasions that such padding is normal and discarded by `gzip(1)`, too.) Adds tests for the special case that the first `inflate()` call receives only the first few bytes of a second gzip member but not the whole header (or even just the magic bytes). PR-URL: https://github.com/nodejs/node/pull/5883 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-30lib: remove bootstrap global context indirectionJeremiah Senkpiel
PR-URL: https://github.com/nodejs/node/pull/5881 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-03-28async_wrap: don't abort on callback exceptionTrevor Norris
Rather than abort if the init/pre/post/final/destroy callbacks throw, force the exception to propagate and not be made catchable. This way the application is still not allowed to proceed but also allowed the location of the failure to print before exiting. Though the stack itself may not be of much use since all callbacks except init are called from the bottom of the call stack. /tmp/async-test.js:14 throw new Error('pre'); ^ Error: pre at InternalFieldObject.pre (/tmp/async-test.js:14:9) PR-URL: https://github.com/nodejs/node/pull/5756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2016-03-28async_wrap: notify post if intercepted exceptionTrevor Norris
The second argument of the post callback is a boolean indicating whether the callback threw and was intercepted by uncaughtException or a domain. Currently node::MakeCallback has no way of retrieving a uid for the object. This is coming in a future patch. PR-URL: https://github.com/nodejs/node/pull/5756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2016-03-28async_wrap: setupHooks now accepts objectTrevor Norris
The number of callbacks accepted to setupHooks was getting unwieldy. Instead change the implementation to accept an object with all callbacks PR-URL: https://github.com/nodejs/node/pull/5756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2016-03-28src: reword command and add ternaryTrevor Norris
Make comment clear that Undefined() is returned for legacy compatibility. This will change in the future as a semver-major change, but to be able to port this to previous releases it needs to stay as is. PR-URL: https://github.com/nodejs/node/pull/5756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2016-03-28src,http_parser: remove KickNextTick callTrevor Norris
Now that HTTPParser uses MakeCallback it is unnecessary to manually process the nextTickQueue. The KickNextTick function is now no longer needed so code has moved back to node::MakeCallback to simplify implementation. Include minor cleanup moving Environment::tick_info() call below the early return to save an operation. PR-URL: https://github.com/nodejs/node/pull/5756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
2016-03-26crypto: improve error messagesSakthipriyan Vairamani
Introduce a new MACRO to check if the data is a String object and update existing MACROs to include the actual object description to be printed in case of an error. PR-URL: https://github.com/nodejs/node/pull/3100 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-25node: --no-browser-globals configure flagFedor Indutny
Introduce `--no-browser-globals` configure flag. With this flag set, following globals won't be exported: - `setTimeout`, `clearTimeout`, `setInterval`, `clearInterval`, `setImmediate`, `clearImmediate` - `console` These are provided by the DOM implementation in browser, so the `--no-browser-globals` flag may be helpful when embedding node.js within chromium/webkit. Inspired-By: https://github.com/atom/node/commit/82e10ce94f3c90234dac187f04a47d4d357ffd31 PR-URL: https://github.com/nodejs/node/pull/5853 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2016-03-25fs: Buffer and encoding enhancements to fs APIJames M Snell
This makes several changes: 1. Allow path/filename to be passed in as a Buffer on fs methods 2. Add `options.encoding` to fs.readdir, fs.readdirSync, fs.readlink, fs.readlinkSync and fs.watch. 3. Documentation updates For 1... it's now possible to do: ```js fs.open(Buffer('/fs/foo/bar'), 'w+', (err, fd) => { }); ``` For 2... ```js fs.readdir('/fs/foo/bar', {encoding:'hex'}, (err,list) => { }); fs.readdir('/fs/foo/bar', {encoding:'buffer'}, (err, list) => { }); ``` encoding can also be passed as a string ```js fs.readdir('/fs/foo/bar', 'hex', (err,list) => { }); ``` The default encoding is set to UTF8 so this addresses the discrepency that existed previously between fs.readdir and fs.watch handling filenames differently. Fixes: https://github.com/nodejs/node/issues/2088 Refs: https://github.com/nodejs/node/issues/3519 PR-URL: https://github.com/nodejs/node/pull/5616 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-03-24process: add 'warning' event and process.emitWarning()James M Snell
In several places throughout the code we write directly to stderr to report warnings (deprecation, possible eventemitter memory leak). The current design of simply dumping the text to stderr is less than ideal. This PR introduces a new "process warnings" mechanism that emits 'warning' events on the global process object. These are invoked with a `warning` argument whose value is an Error object. By default, these warnings will be printed to stderr. This can be suppressed using the `--no-warnings` and `--no-deprecation` command line flags. For warnings, the 'warning' event will still be emitted by the process, allowing applications to handle the warnings in custom ways. The existing `--no-deprecation` flag will continue to supress all deprecation output generated by the core lib. The `--trace-warnings` command line flag will tell Node.js to print the full stack trace of warnings as part of the default handling. The existing `--no-deprecation`, `--throw-deprecation` and `--trace-deprecation` flags continue to work as they currently do, but the exact output of the warning message is modified to occur on process.nextTick(). The stack trace for the warnings and deprecations preserve and point to the correct call site. A new `process.emitWarning()` API is provided to permit userland to emit warnings and deprecations using the same consistent mechanism. Test cases and documentation are included. PR-URL: https://github.com/nodejs/node/pull/4782 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Wyatt Preul <wpreul@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-23zlib: Fix handling of gzip magic bytes mid-fileAnna Henningsen
Only treat the gzip magic bytes, when encountered within the file after reading a single block, as the start of a new member when the previous member has ended. Add test files that reliably reproduce #5852. The gzipped file in test/fixtures/pseudo-multimember-gzip.gz contains the gzip magic bytes exactly at the position that node encounters after having read a single block, leading it to believe that a new data member is starting. Fixes: https://github.com/nodejs/node/issues/5852 PR-URL: https://github.com/nodejs/node/pull/5863 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-23buffer: add swap16() and swap32() methodsJames M Snell
Adds Buffer.prototype.swap16() and Buffer.prototype.swap32() methods that mutate the Buffer instance in-place by swapping the 16-bit and 32-bit byte-order. Example: ```js const buf = Buffer([0x1, 0x2, 0x3, 0x4]); buf.swap16(); console.log(buf); // prints Buffer(0x2, 0x1, 0x4, 0x3); buf.swap32(); console.log(buf); // prints Buffer(0x3, 0x4, 0x1, 0x2); ``` PR-URL: https://github.com/nodejs/node/pull/5724 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-03-23etw: fix descriptors of events 9 and 23João Reis
Event 9 must include the string terminator in the last descriptor. Event 23 must be published with no descriptors, in accordance with the manifest. PR-URL: https://github.com/nodejs/node/pull/5742 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22lib: rename /node.js to /bootstrap_node.jsJeremiah Senkpiel
PR-URL: https://github.com/nodejs/node/pull/5103 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22lib,src: move src/node.js to lib/internal/node.jsJeremiah Senkpiel
PR-URL: https://github.com/nodejs/node/pull/5103 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22lib,src: refactor src/node.js into internal filesJeremiah Senkpiel
PR-URL: https://github.com/nodejs/node/pull/5103 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-22src: override v8 thread defaults using cli optionsTom Gallacher
Based on the conversation in #4243 this implements a way to increase and decrease the size of the thread pool used in v8. Currently v8 restricts the thread pool size to `kMaxThreadPoolSize` which at this commit is (4). So it is only possible to decrease the thread pool size at the time of this commit. However with changes upstream this could change at a later date. If set to 0 then v8 would choose an appropriate size of the thread pool based on the number of online processors. PR-URL: https://github.com/nodejs/node/pull/4344 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-03-21buffer: throw range error before truncating writeMatt Loring
The check to determine whether `noAssert` was set to true and thus whether RangeErrors should be thrown was happening after the write was truncated to the available size of the buffer. These checks now occur in the correct order. Fixes: https://github.com/nodejs/node/issues/5587 PR-URL: https://github.com/nodejs/node/pull/5605 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-21doc: add a cli options doc pageJeremiah Senkpiel
This page is mostly a mirror of the updated manual page. PR-URL: https://github.com/nodejs/node/pull/5787 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell jasnell@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
2016-03-20src,tools: use template literalsRich Trott
Convert string concatenation to template literals. Enforce with lint rule. PR-URL: https://github.com/nodejs/node/pull/5778 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-03-20fs: add the fs.mkdtemp() function.Florian MARGAINE
This uses libuv's mkdtemp function to provide a way to create a temporary folder, using a prefix as the path. The prefix is appended six random characters. The callback function will receive the name of the folder that was created. Usage example: fs.mkdtemp('/tmp/foo-', function(err, folder) { console.log(folder); // Prints: /tmp/foo-Tedi42 }); The fs.mkdtempSync version is also provided. Usage example: console.log(fs.mkdtemp('/tmp/foo-')); // Prints: tmp/foo-Tedi42 This pull request also includes the relevant documentation changes and tests. PR-URL: https://github.com/nodejs/node/pull/5333 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-19contextify: tie lifetimes of context & sandboxAli Ijaz Sheikh
When the previous set of changes (bfff07b4) it was possible to have the context get garbage collected while sandbox was still live. We need to tie the lifetime of the context to the lifetime of the sandbox. Fixes: https://github.com/nodejs/node/issues/5768 PR-URL: https://github.com/nodejs/node/pull/5786 Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-03-19buffer: fix buffer alignment restrictionAli Ijaz Sheikh
Recent phantom weakness API changes to buffer, ebbbc5a, ending up introducing an alignment restriction on the native buffer pointers. It turns out that there are uses in the modules ecosystem that rely on the ability to create buffers with unaligned pointers (e.g. node-ffi). It turns out there is a simpler solution possible here. As a side effect this also removes the need to have to reserve the first internal field on buffers. PR-URL: https://github.com/nodejs/node/pull/5752 Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-03-18tools: add buffer-constructor eslint ruleJames M Snell
Now that the Buffer.alloc, allocUnsafe, and from methods have landed, add a linting rule that requires their use within lib. Tests and benchmarks are explicitly excluded by the rule. PR-URL: https://github.com/nodejs/node/pull/5740 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-03-18win: prevent node from running on Windows Vista or earlierAlexis Campailla
Ref: https://github.com/nodejs/node/issues/3804 PR-URL: https://github.com/nodejs/node/pull/5167 Reviewed-By: rvagg - Rod Vagg <rod@vagg.org> Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
2016-03-16doc: reformat & improve node.1 manual pageJeremiah Senkpiel
Uses better troff formatting. Removes v8 options from the man page. Also edits `node -h` in node.cc slightly. PR-URL: https://github.com/nodejs/node/pull/5497 Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2016-03-16buffer: add .from(), .alloc() and .allocUnsafe()James M Snell
Several changes: * Soft-Deprecate Buffer() constructors * Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()` * Add `--zero-fill-buffers` command line option * Add byteOffset and length to `new Buffer(arrayBuffer)` constructor * buffer.fill('') previously had no effect, now zero-fills * Update the docs PR-URL: https://github.com/nodejs/node/pull/4682 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2016-03-15src: allow combination of -i and -e cli flagsRich Trott
If both -i and -e flags are specified, do not ignore the -i. Instead, launch the interactive REPL and start by evaluating the passed string. Fixes: https://github.com/nodejs/node/issues/1197 PR-URL: https://github.com/nodejs/node/pull/5655 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-15zlib: add support for concatenated membersKári Tristan Helgason
According to the spec gzipped archives can contain more than one compressed member. Previously Node's gzip implementation would only unzip the first member and throw away the rest of the compressed data. Issue #4306 is an example of this occurring in daily use. Fixes: https://github.com/nodejs/node/issues/4306 PR-URL: https://github.com/nodejs/node/pull/5120 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-15net: make `isIPv4` and `isIPv6` more efficientVladimir Kurchatkin
`isIPv4` and `isIPv6` are implemented on top of `isIP`, which in turn checks the sting for being both IPv4 and IPv6, which can be inefficient in some scenarios. This commit makes them use `uv_inet_pton` directly instead. PR-URL: https://github.com/nodejs/node/pull/5478 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-08src,http: fix uncaughtException miss in httpTrevor Norris
In AsyncWrap::MakeCallback always return empty handle if there is an error. In the future this should change to return a v8::MaybeLocal, but that major change will have to wait for v6.x, and these changes are meant to be backported to v4.x. The HTTParser call to AsyncWrap::MakeCallback failed because it expected a thrown call to return an empty handle. In node::MakeCallback return an empty handle if the call is in_makecallback(), otherwise return v8::Undefined() as usual to preserve backwards compatibility. Fixes: https://github.com/nodejs/node/issues/5555 PR-URL: https://github.com/nodejs/node/pull/5591 Reviewed-By: Julien Gilli <jgilli@nodejs.org>
2016-03-05crypto: simplify Certificate class bindingsAlexander Makarenko
Replace Certificate C++ class with simple functions. Update crypto.Certificate methods accordingly. PR-URL: https://github.com/nodejs/node/pull/5382 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-03src: fix NewInstance deprecation warningsMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/4722 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>