0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

299 Commits

Author SHA1 Message Date
Ali Ijaz Sheikh
b30ec59855 deps: switch to v8_inspector in V8
* Delete deps/v8_inspector
* Start building v8_inspector from V8
* Remove licenses related to the deleted code from LICENSE file

PR-URL: https://github.com/nodejs/node/pull/10992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-02-22 15:56:58 +01:00
Wayne Andrews
f8ee197614 build: add code coverage to make
PR-URL: https://github.com/nodejs/node/pull/10856
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-02-17 10:25:36 -05:00
Kenan Yildirim
70afe9d3ac build: fix building with ninja on linux
On Linux, `ninja` appears to place `libv8_base.a` inside `OBJ_DIR`, as opposed
to `ninja` on OS X which places it outside of that directory. Furthermore, the
expected `OBJ_DIR` value (`obj.target/`) is actually just `obj/` for `ninja`.
This patch solves both of these issues by setting `OBJ_DIR` and `V8_BASE` to the
correct values for `ninja` on Linux specifically.

PR-URL: https://github.com/nodejs/node/pull/11348
Fixes: https://github.com/nodejs/node/issues/9861
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-16 17:16:26 -08:00
Timothy Gu
c6b12d0984 url: fix surrogate handling in encodeAuth()
Also factor out common parts in querystring and url.

PR-URL: https://github.com/nodejs/node/pull/11161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2017-02-14 12:13:11 -08:00
Ben Noordhuis
c30fc8d495 src: support UTF-8 in compiled-in JS source files
Detect it when source files in lib/ are not ASCII.  Decode them as UTF-8
and store them as UTF-16 in the binary so they can be used as external
string resources without non-ASCII characters getting mangled.

Fixes: https://github.com/nodejs/node/issues/10673
PR-URL: https://github.com/nodejs/node/pull/11129
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-13 19:16:14 +01:00
Anna Henningsen
fd18b656a3
lib: build node inspect into node
Include the relevant files from `deps/node-inspect` in the compiled
`node` binary and make `node inspect` work like `node-inspect`.

PR-URL: https://github.com/nodejs/node/pull/10187
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-02-13 14:50:32 +01:00
James M Snell
159749d522 errors: add internal/errors.js
Add the internal/errors.js core mechanism.

PR-URL: https://github.com/nodejs/node/pull/11220
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2017-02-09 13:46:14 -08:00
yorkie
1b30df1003 stream: move legacy to lib/internal dir
Improve readability of lib/stream.js by moving the legacy abstract
Stream into lib/internal/streams/legacy.js.

PR-URL: https://github.com/nodejs/node/pull/8197
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-02-01 09:58:51 +01:00
Gibson Fahnestock
ae21a51154 build: don't build deps/zlib if --shared-zlib set
Even if the --shared-zlib flag was used, the bundled deps/zlib was still
being compiled into the binary as it was required by the C++ test suite.

PR-URL: https://github.com/nodejs/node/pull/10657
Fixes: https://github.com/nodejs/node/issues/10649
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-01-29 22:37:38 +00:00
Daniel Bevenius
974ecb0598 build: sort sources alphabetically
The header files in the sources list are sorted alphabetically but not
the c++ source code files. This commit sorts the c++ source code file
names.

PR-URL: https://github.com/nodejs/node/pull/10892
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-20 08:04:02 +01:00
Daniel Bevenius
f57dabe412 build: move source files from headers section
Currently, the sources list contains sources and headers which are
separated by a comment. I noticed two .cc files after the headers
comment and this commit moves those files the start of the list
where the rest of source files are.

PR-URL: https://github.com/nodejs/node/pull/10850
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
2017-01-18 08:22:31 +01:00
Daniel Bevenius
684590fd7a build: add missing src/tracing header files
I noticed that only one header from src/tracing is included in the
sources list in node.gyp. Not sure if this is intentional or not so I
wanted to bring it up just in case this was overlooked.

PR-URL: https://github.com/nodejs/node/pull/10851
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
2017-01-18 08:13:16 +01:00
cjihrig
2f885e7a43 cluster: refactor module into multiple files
This commit splits the existing cluster module into several
internal modules. More specifically, the cluster master and
worker implementations are separated, and the various data
structures are separated.

PR-URL: https://github.com/nodejs/node/pull/10746
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-01-13 17:01:07 -05:00
Stewart X Addison
e407478ebe build: add /opt/freeware/... to AIX library path
To ease the use of the AIX binaries, add
/opt/freeware/lib/pthread{/ppc64} into the search path encoded into the
library, so that any version the user has installed from the common
download locations will work out of the box without having to explicitly
set LIBPATH in their environment.

PR-URL: https://github.com/nodejs/node/pull/10128
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-29 11:46:25 +02:00
misterpoe
ba4847e879 src: Node Tracing Controller
This commit adds support for trace-event tracing to Node.js. It provides
a mechanism to centralize tracing information generated by V8, Node
core, and userspace code. It includes:

 - A trace writer responsible for serializing traces and cycling the
   output files so that no individual file becomes to large.
 - A buffer for aggregating traces to allow for batched flushes.
 - An agent which initializes the tracing controller and ensures that
   trace serialization is done on a separate thread.
 - A set of macros for generating trace events.
 - Tests and documentation.

Author: Raymond Kang <raymondksi@gmail.com>
Author: Kelvin Jin <kelvinjin@google.com>
Author: Matthew Loring <mattloring@google.com>
Author: Jason Ginchereau <jasongin@microsoft.com>

PR-URL: https://github.com/nodejs/node/pull/9304

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Josh Gavant <josh.gavant@outlook.com>
2016-12-20 12:31:09 -08:00
Eugene Ostroukhov
f9aadfbc5a inspector: move options parsing
As inspector functionality expands, more options will need to be added.
Currently this requires changing adding function arguments, etc. This
change packs the veriables into a single class that can be extended
without changing APIs.

PR-URL: https://github.com/nodejs/node/pull/9691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-09 09:07:50 -08:00
Eugene Ostroukhov
42da740ed8 inspector: split HTTP/WS server from the inspector
Both our team experiments and some embedder request indicate a potential
in implementing alternative transport for inspector - e.g. IPC pipes or
custom embedder APIs. This change moves all HTTP specific code into a
separate class and is a first attempt at defining a boundary between the
inspector agent and transport. This API will be refined as new
transports are implemented.
Note that even without considering alternative transports, this change
enables better testing of the HTTP server (Valgrind made it possible to
identify and fix some existing memory leaks).

PR-URL: https://github.com/nodejs/node/pull/9630
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-06 14:47:49 -08:00
Stewart Addison
1bd871655a build: add shared library support to AIX build
Updates to build the shared library version of node on AIX. Adds the
same functionality to AIX that was added on Linux under this:

Ref: https://github.com/nodejs/node/pull/6994/

PR-URL: https://github.com/nodejs/node/pull/9675
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-22 14:22:22 -05:00
Wayne Andrews
5d9d415972 build: Add option to compile for coverage reports
Add --coverage option to configure to support
compiling for generation of C based coverage reports

PR-URL: https://github.com/nodejs/node/pull/9463
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-11-08 09:33:40 -05:00
Eugene Ostroukhov
8f00455c51 inspector: switch to new inspector APIs
This implementation switches to V8 inspector from the V8 repository. The
new inspector integration is now using final APIs and exposes a stable
wire protocol, removing the need for pointing the users to specific
devtools version.

PR-URL: https://github.com/nodejs/node/pull/9028
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-26 09:37:45 -07:00
James M Snell
e8eaaa7724 buffer: add buffer.transcode
Add buffer.transcode(source, from, to) method. Primarily uses ICU
to transcode a buffer's content from one of Node.js' supported
encodings to another.

Originally part of a proposal to add a new unicode module. Decided
to refactor the approach towrds individual PRs without a new module.

Refs: https://github.com/nodejs/node/pull/8075
PR-URL: https://github.com/nodejs/node/pull/9038
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-10-25 10:12:02 -07:00
Bradley T. Hughes
a9f4fc905a build: do not define ZLIB_CONST
This define is not available in zlib prior to version 1.2.5.2. See
https://github.com/nodejs/node/issues/9110 for details. Workaround the
build breakage reported by casting away const in src/inspector_agent.cc
instead.

PR-URL: https://github.com/nodejs/node/pull/9122
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-10-18 14:20:10 +11:00
Bradley T. Hughes
c457b928d0 build: add -DZLIB_CONST when building with --shared-zlib
Commit 782620f added the define only when building with the bundled
zlib. Using a shared zlib results in build breakage:

../src/inspector_agent.cc:179:16: error: assigning to 'Bytef *' (aka 'unsigned char *') from incompatible type
      'const uint8_t *' (aka 'const unsigned char *')
  strm.next_in = PROTOCOL_JSON + 3;
               ^ ~~~~~~~~~~~~~~~~~
1 error generated.

PR-URL: https://github.com/nodejs/node/pull/9077
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-10-14 16:51:48 -05:00
James M Snell
4b312387ea url: adding WHATWG URL support
Implements WHATWG URL support. Example:

```
var u = new url.URL('http://example.org');
```

Currently passing all WHATWG url parsing tests and all but two of the
setter tests. The two setter tests are intentionally skipped for now
but will be revisited.

PR-URL: https://github.com/nodejs/node/pull/7448
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
2016-10-11 12:41:42 -07:00
Ben Noordhuis
782620f03f src: add /json/protocol endpoint to inspector
Embed the compressed and minified protocol.json from the bundled
v8_inspector and make it available through the /json/protocol endpoint.

Refs: https://github.com/nodejs/diagnostics/issues/52
PR-URL: https://github.com/nodejs/node/pull/7491
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-23 18:51:47 +02:00
Michaël Zasso
fbfc15c51b build: update V8 gypfile paths
The location of various gypfiles has changed in V8 5.2.

PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2016-09-22 09:53:18 +02:00
James M Snell
dc7277909b fs: move SyncWriteStream to internal/fs
Move the implementation of SyncWriteStream to internal/fs.

PR-URL: https://github.com/nodejs/node/pull/6749
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-09-02 10:22:00 -07:00
Michael Dawson
1657f12f75 build: fix dependencies on AIX
Addon tests were still starting to run before the node exp file
creation was complete.

- remove process_outputs_as_sources as it did not fix the
  problem
- update create_expfile.sh so that exp file is created in a
  temporary file and then renamed to final name so that
  file is only visible once it is complete
- update target used in building Addons so that for
  AIX it depends on the exp file being available

PR-URL: https://github.com/nodejs/node/pull/8285
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-08-29 16:20:18 -04:00
Michael Dawson
063d14e496 build: fix dependencies on AIX
Addon tests were starting to run before the node exp file
creation was complete. Add process_outputs_as_sources to avoid
this.

Fixes: https://github.com/nodejs/node/issues/8239
PR-URL: https://github.com/nodejs/node/pull/8272
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-08-25 18:28:58 -04:00
Stewart Addison
a7222052d4 build: add correct shared library naming on OS X
The build system currently creates a shared library on OS X with the
same name as on Linux i.e.  libnode.so.48.  This is inconsistent with
the conventions on OS X which uses libnode.48.so This commit changes
the build process and install.py (used by make binary) to build with
the correct name on OS X when the --shared configure parameter is used.

PR-URL: https://github.com/nodejs/node/pull/7687
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-08-09 11:55:01 -04:00
Ben Noordhuis
e03a7b2a2b build: turn on thin static archives
Thin archives were disabled in 2012 as a workaround (IIRC) for obsolete
tooling on one of Joyent's platforms.  The last binutils versions that
didn't support them was released in 2007 so I think it's safe to assume
we can drop support for that now - except on SmartOS, where the tooling
still has a distinctive vintage feel to it.

Thin archives save space - it shrinks the size of PRODUCT_DIR by 30% -
and speed up the final linking step because it doesn't have to assemble
50 MB of static archives (twice! - first to create the archive, then to
copy it to PRODUCT_DIR).  The archives are just 3.5 MB now and no longer
copied around.

PR-URL: https://github.com/nodejs/node/pull/7957
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-09 14:06:50 +02:00
Alex Hultman
359352c9e9
build: export zlib symbols on Windows
Base the generated openssl.def on existing zlib.def. We cannot specify
more than one DEF file per executable so we need to merge the two DEF
files to expose both OpenSSL and Zlib functionality to addons.

If OpenSSL is not used, link against zlib.def itself.

PR-URL: https://github.com/nodejs/node/pull/7983
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-08 15:15:48 +02:00
Stefan Budeanu
88e862ba82 build: windows sharedlib support
Added "dll" option to vcbuild.bat
Insure that Unix SO name is not used on Windows (i.e. produce a .dll file)
Insure that Node and its V8 dependency link against the Visual C++ Runtime
dynamically.
Requires backported V8 patch, see PR 7802.

Ref: https://github.com/nodejs/node/pull/7802

PR-URL: https://github.com/nodejs/node/pull/7487
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-08-05 09:27:48 -04:00
Ben Noordhuis
c0676f3f0f build: fix typo in non-essential source file name
Depend on src/inspector_agent.h, src/inspector-agent.h does not exist.

The typo didn't break the build but it made some of the gyp-based
tooling complain.

PR-URL: https://github.com/nodejs/node/pull/7945
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-08-03 11:11:57 +02:00
Daniel Bevenius
b896057109
src: unifying PipeConnectWrap and TCPConnectWrap
This commit attempts to address one of the items in #4641 which is
related to src/pipe_wrap.cc and src/tcp_wrap.cc. Currently both
pipe_wrap.cc and tcp_wrap.cc contain a class that are almost
identical. This commit extracts these parts into a separate class
that both can share.

PR-URL: https://github.com/nodejs/node/pull/7501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-07-28 18:00:00 +02:00
Ali Ijaz Sheikh
b9445bfecd deps: update v8_inspector
To add a LICENSE file along with the v8_inspector code, we need to
pick up v8_inspector from an intermediate repository:
https://github.com/pavelfeldman/v8_inspector. This repo still tracks
upstream code in Blink.

This roll also picks up the latest v8_inspector from upstream fixing
a few issues.

* Pickup commit id bc60957 from pavelfeldman/v8_inspector
* Update node.gyp to adapt to the new file paths
* Update the DevTools hash for the devtools frontend.

Fixes: https://github.com/nodejs/node/issues/7123
Fixes: https://github.com/nodejs/node/issues/7736
Fixes: https://github.com/nodejs/node/issues/7734
PR-URL: https://github.com/nodejs/node/pull/7796
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2016-07-27 07:28:44 -07:00
Daniel Bevenius
46633934fe
src: pull OnConnection from pipe_wrap and tcp_wrap
One of the issues in #4641 concerns OnConnection in pipe_wrap and
tcp_wrap which are very similar with some minor difference in how
they are coded. This commit extracts OnConnection so both these
classes can share the same implementation.

PR-URL: https://github.com/nodejs/node/pull/7547
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-25 09:50:51 +02:00
Alex Hultman
b8b8c36b6a
build: export more openssl symbols on Windows
This exports even more openssl symbols when building
on Windows. SSL_set_fd is one example of added symbol.

PR-URL: https://github.com/nodejs/node/pull/7576
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-07-13 00:22:07 +02:00
Ben Noordhuis
0a9f27b0ee build: add --enable-d8 configure option
Add an option to the configure script for building d8.  Useful for
testing V8 standalone.

PR-URL: https://github.com/nodejs/node/pull/7538
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2016-07-09 09:24:54 +02:00
Сковорода Никита Андреевич
990c9683e9 build: respect --shared-* flags for inspector deps
Don't build openssl/http_parser/libuv for v8_inspector if corresponding
--shared-* flags were passed to the ./configure script.

Fixes: https://github.com/nodejs/node/issues/7478
Fixes: https://github.com/nodejs/node/issues/7583
PR-URL: https://github.com/nodejs/node/pull/7569
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2016-07-09 10:22:32 +03:00
Ben Noordhuis
b4d4fd939c build: export openssl symbols on windows
Export symbols from the bundled openssl for add-ons to link against.

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/4051
PR-URL: https://github.com/nodejs/node/pull/6274
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-07-05 16:09:58 +02:00
Gireesh Punathil
d80432db76 build: enable big toc for release builds in AIX
AIX linker has a table of contents with default size 64K
The recent code inclusions in V8 brings in lot of new
symbols which necessitates to increase this default.

Please note that the debug build already has this flag

Fixes: https://github.com/nodejs/node/issues/7500
PR-URL: https://github.com/nodejs/node/pull/7508
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-05 09:53:13 -04:00
Ben Noordhuis
7dcc4af827 build: drop unconditional openssl dep from cctest
Don't link in openssl when building `./configure --without-inspector`,
it's only used by the inspector cctests.  Ditto libuv and http_parser.

Fixes unnecessarily building openssl when `--shared-openssl` is also
passed to configure.

Fixes: https://github.com/nodejs/node/issues/7478
PR-URL: https://github.com/nodejs/node/pull/7486
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-06-30 13:30:46 +02:00
Ben Noordhuis
787eddf794 src: print backtrace on fatal error
Print a C backtrace on fatal errors to make it easier to debug issues
like https://github.com/nodejs/node/issues/6727.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:49:37 +02:00
Michaël Zasso
fbfe6c70e1
build: don't include V8 from node.gyp
It is no longer necessary now that libplatform/libplatform.h uses proper
includes.

PR-URL: https://github.com/nodejs/node/pull/7016
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-06-29 10:44:29 +02:00
Stefan Budeanu
410296c37a build: configure --shared
Add configure flag for building a shared library that can be
embedded in other applications (like Electron). Add flags
--without-bundled-v8 and --without-v8-platform to control V8
dependencies used.

PR-URL: https://github.com/nodejs/node/pull/6994
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2016-06-28 17:48:22 -04:00
Ben Noordhuis
d7087df4da src: use RAII for mutexes and condition variables
We will be introducing many more critical sections in the upcoming
multi-isolate changes, so let's make manual synchronization a thing
of the past.

PR-URL: https://github.com/nodejs/node/pull/7334
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-06-21 10:29:14 +02:00
Ali Ijaz Sheikh
44b9154495 deps: switch to upstream v8_inspector
This change picks up v8_inspector directly from the upstream chromium
repository [1]; dropping the intermediate repository. The upstream
code has been refactored substantially to make it easy to share code
without adaptation with Node.js.

The deps/v8_inspector directory is now simply a gathering of
dependencies:

* platform/v8_inspector: vendored from [2].
* platform/inspector_protocol: vendored from [3].
* deps/jinja2: vendored from [4].
* deps/markupsafe: vendored from [5].

[1]: https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform
[2]: https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/v8_inspector
[3]: https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/inspector_protocol
[4]: https://github.com/mitsuhiko/jinja2
[5]: https://github.com/mitsuhiko/markupsafe

PR-URL: https://github.com/nodejs/node/pull/7302
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-06-17 10:37:11 -07:00
Brian White
686984696d
stream: improve Readable.read() performance
read() performance is improved most by switching from an array to
a linked list for storing buffered data. However, other changes that
also contribute include: making some hot functions inlinable, faster
read() argument checking, and misc code rearrangement to avoid
unnecessary code execution.

PR-URL: https://github.com/nodejs/node/pull/7077
Reviewed-By: Calvin Metcalf <calvin.metcalf@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2016-06-14 15:15:34 -04:00
Pavel Feldman
84ad31fff3 src,lib: v8-inspector support
This change introduces experimental v8-inspector support. This brings
the DevTools debug protocol allowing Node.js to be debugged with
Chrome DevTools native, or through other debuggers supporting that
protocol.

Partial WebSocket support, to the extent required by DevTools, is
included. This is derived from the implementation in Blink.

v8-inspector support can be disabled by the --without-inspector
configure flag.

PR-URL: https://github.com/nodejs/node/pull/6792
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2016-05-30 09:05:46 -07:00