Граф коммитов

25161 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Apthorp 2dc0f8811b fix: bump NODE_MODULE_VERSION to 70 (#96) 2019-03-18 11:36:44 -07:00
Heilig Benedek e05e32041c perf_hooks: clean up GC listeners (#94)
Add Environment cleanup hooks to remove GC listeners when the
`Environment` is torn down.

PR-URL: https://github.com/nodejs/node/pull/25647
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-18 11:36:44 -07:00
Jeremy Apthorp dc7527be04 fix: BN_bn2bin_padded returns 1 on success instead of size
fixup! fix: update with BORINGSSL api for node_crypto.cc
2019-03-18 11:36:44 -07:00
Jeremy Apthorp 30399f700a fix: more extra-semi warnings 2019-03-18 11:36:44 -07:00
Jeremy Apthorp a46421f493 fix: extra-semi warning 2019-03-18 11:36:44 -07:00
Jeremy Apthorp 201be1b62d refactor: split out main config so inspector can share (#93) 2019-03-18 11:36:44 -07:00
deepak1556 d7babbeab7 FIXME: silence string-plus-int warning 2019-03-18 11:36:44 -07:00
cjihrig f4ff59351e deps: [uv] win: fix sizeof-pointer-div warning
short_path's type changed from WCHAR array to WCHAR*
in https://github.com/libuv/libuv/pull/1267, leading
to a sizeof-pointer-div warning.

Fixes: https://github.com/libuv/libuv/issues/2138
PR-URL: https://github.com/libuv/libuv/pull/2139
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2019-03-18 11:36:44 -07:00
Jeremy Apthorp a80f4b35bf vm: mark scripts as shareable cross-origin 2019-03-18 11:36:44 -07:00
Sam Roberts 5a3eb6c31d [cherry-pick] src: check curve ID existence instead of asn flags
Simplify the code. The flag check was in the OpenSSL source, but reading
through the docs and source, it is not necessary.

Refs: https://github.com/nodejs/node/pull/24358/files#r243099693
PR-URL: https://github.com/nodejs/node/pull/25345
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2019-03-18 11:36:44 -07:00
Kevin Sawicki 804d7cd4ca Call process.log from fallback stream on Windows
(cherry picked from commit d31e629b4f2daf3500a485caab2b2990a41e3ad4)
2019-03-18 11:36:44 -07:00
Cheng Zhao 5220fbe2a4 Pass all globals through "require"
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
2019-03-18 11:36:44 -07:00
Shelley Vohr f74dbdaec8 fix: patch js2c.py to give the right name to config_gypi 2019-03-18 11:36:44 -07:00
deepak1556 05b8bcdfa6 Allow embedder to reuse the per process NativeModuleLoader 2019-03-18 11:36:44 -07:00
deepak1556 1c4b4b24be fix: update with BORINGSSL api for node_crypto.cc 2019-03-18 11:36:44 -07:00
deepak1556 cc909409d7 FIXME: compile error with microsoft-include
../../third_party/electron_node/src/tracing/agent.h(7,10):  error: #include resolved using non-portable Microsoft search rules as: ../../third_party/electron_node/src/util.h [-Werror,-Wmicrosoft-include]
         ^
1 error generated.
2019-03-18 11:36:44 -07:00
Samuel Attard bccb16a023 fix: expose tracing::Agent and use tracing::TracingController instead of v8::TracingController 2019-03-18 11:36:44 -07:00
Samuel Attard 123fe02c23 fixme: Revert "crypto: make PEM parsing RFC7468-compliant"
This reverts commit ad07e44b37.
2019-03-18 11:36:44 -07:00
Samuel Attard 983e276eca fixme: Revert "crypto: add API for key pair generation"
This reverts commit 8c502f54ce.
2019-03-18 11:36:44 -07:00
Samuel Attard 18000c698a chore: update GN build files
* src/BUILD.gn
* src/inspector/BUILD.gn
* filenames.json
* deps/*/BUILD.gn
2019-03-18 11:36:44 -07:00
Andy Dill 6871b64a14 fix: use zlib from electron_node (#75) 2019-03-18 11:36:44 -07:00
Jeremy Apthorp dd004226ca fix: export napi symbols (#77)
matches the change in node.h in 88b494191c, both are necessary because Chromium builds with symbols hidden by default
2019-03-18 11:36:44 -07:00
Shelley Vohr b931f11c0e fix: remove NODE_WITHOUT_NODE_OPTIONS (#76) 2019-03-18 11:36:44 -07:00
Jeremy Apthorp 966942dc07 fix: export libuv symbols (#73)
Closes electron/electron#15075
2019-03-18 11:36:44 -07:00
Andy Dill 306c51a984 fix: include names.h in zlib header package (#74) 2019-03-18 11:36:44 -07:00
Samuel Attard 55827f8a9e fix: fix the patch that adds the build_v8_with_gn variable for node < 10 support 2019-03-18 11:36:44 -07:00
Andreas Haas bb8af52920 src: initialize PerIsolateData eagerly
PR-URL: https://github.com/nodejs/node/pull/21983
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-18 11:36:44 -07:00
Samuel Attard 6e4acd11ce fix: tar.py is somehow broken 2019-03-18 11:36:44 -07:00
Samuel Attard e1dbfb2237 gn: generate header tar.gz file as part of gn headers target 2019-03-18 11:36:44 -07:00
Jeremy Apthorp 0fedd34f37 export Environment::kNodeContextTagPtr 2019-03-18 11:36:44 -07:00
Shelley Vohr d4b401786a feat: add flags for low-level hooks and exceptions
This commit adds two new exposed methods to `node.cc`, `InitGeneric` and
`LoadEnvironmentGeneric` that allow for control of which mode Node
should run, which i have called `standalone_mode` and
`upstream_node_mode`. Default behavior of `Init` and `LoadEnvironment`
remain the same.

We have 3 modes when running Node in Electron:
1. In the main process, we want to have a full Node environment, but
with signal handlers and other low level things disabled
2. In renderer process, we want Node to reuse the web page's context
3. In `ELECTRON_RUN_AS_NODE`, we want Node to run as it runs officially
by default

For modes 1 and 3, we have Node create a new V8 context with a Node
Environment on it. However, for mode 2, since the V8 context is created
by blink for web frames and web workers we make Node create the Node
Environment on the V8 context of blink, so no new V8 context is created.

As a result, a renderer process may have multiple Node Environments in it.
2019-03-18 11:36:44 -07:00
Shelley Vohr 8044057aeb feat: add new built_with_electron variable to config.gypi 2019-03-18 11:36:44 -07:00
Jeremy Apthorp 9fa79e275d build: automatically generate some file lists that the GN build uses 2019-03-18 11:36:44 -07:00
Jeremy Apthorp 6490b0fe07 fix: add a default value for the 'enable_lto' variable in common.gypi 2019-03-18 11:36:44 -07:00
Jeremy Apthorp a59b56f881 fix: export DebugOptions 2019-03-18 11:36:44 -07:00
Jeremy Apthorp 74e3868af2 fix: remove OCB support when OPENSSL_NO_OCB is defined
BoringSSL doesn't support OCB.
2019-03-18 11:36:44 -07:00
Jeremy Apthorp ad941a9870 fix: trace_event_categories moved to per_process_opts 2019-03-18 11:36:44 -07:00
Jeremy Apthorp 0484af9b83 build: add GN build files 2019-03-18 11:36:44 -07:00
Shelley Vohr 7d037192ab fix: allocate memory of Buffer with V8's allocator
Blink overrides ArrayBuffer's allocator with its own one, while Node
simply uses malloc and free. This commit prevents the crash that would
be resultant of mixing them together.
2019-03-18 11:36:44 -07:00
deepak1556 ea8ff98139 fix: expose InternalCallbackScope
This commit exposes InternalCallbackScope in order to allow us access to kAllowEmptyResource for usage https://github.com/electron/electron/blob/master/atom/common/api/atom_bindings.cc\#L108. We should look to accomplish this another way so we no longer need to do this, as in verbose mode the regular CallBack Scope doesn't swallow errors and so we can otherwise use it.
2019-03-18 11:36:44 -07:00
Shelley Vohr e0cd72b187 FIXME: use redefined version of internalModuleStat
Instantiate redefined version of the internalModuleStat function
(see lib/common/asar.js in the electron/electron repo). For some reason
this has to be done after the upgrade to the Node.js v8.7.0. `const
internalModuleStat` in the very beginning of the file holds a reference
to a native Node.js implementation of the function.
2019-03-18 11:36:44 -07:00
Shelley Vohr d179189579 FIXME: remove async_id assertion check 2019-03-18 11:36:44 -07:00
Shelley Vohr e3e8391b65 fix: build and expose inspector agent
Node inspector initialization happens in a different start-up function in node.cc, which we don't call in Electron. This allows for us to use the inspector agent in electron/atom/browser/node_debugger.cc
2019-03-18 11:36:44 -07:00
Shelley Vohr 1d8a16917f fix: expose TraceEventHelper
Node required tracing controller to be initialized, otherwise a crash would occur. Changed in concert with 0e5b6f9300\#diff-0cdfa12fff513e022fac830c6af9c19a
2019-03-18 11:36:44 -07:00
Thiago de Arruda 48809de3d9 Expose `get_builtin_module` function
This is a requirement for electron/electron#8815, which exposes some builtin
modules to sandboxed renderers.

(cherry picked from commit 4c058a6cb5331eef1c7f51c042dd074a2d4f9234)
2019-03-18 11:36:44 -07:00
Cheng Zhao 235f18b354 Export NativeModule
This is used by atom for doing module compile cache.

(cherry picked from commit 83b45fddb9a36c1376f7a2b5c70717e37b6f0133)
2019-03-18 11:34:08 -07:00
Shelley Vohr 673addcceb feat: initialize asar support 2019-03-18 11:34:08 -07:00
Shelley Vohr 1545fedf9e feat: add uv_loop watcher_queue code
Electron's Node Integration works by listening to Node's backend file descriptor in a separate thread; when an event is ready the backend file descriptor will trigger a new event for it, and the main thread will then iterate the libuv loop. For certain operations (ex. adding a timeout task) the backend file descriptor isn't informed, & as a result the main thread doesn't know it needs to iterate the libuv loop so the timeout task will never execute until something else trigger a new event. This commit should be removed when https://github.com/libuv/libuv/pull/1921 is merged
2018-12-20 00:06:48 +05:30
Shelley Vohr 2fcb2992f0 refactor: alter child_process.fork to use execute script with Electron
When forking a child script, we setup a special environment to make the Electron binary run like the upstream node. On Mac, we use the helper app as node binary.
2018-12-20 00:06:47 +05:30
Shelley Vohr 9ba7d5565a fix: don't create console window when creating process
This commit prevents console windows from being spawned when creating processes to better align with what Windows users expect and should be removed when upgrading to a version that includes https://github.com/nodejs/node/pull/21316
2018-12-20 00:06:47 +05:30