Benjamin Gruenbaum and ExE Boss
bf728b5439
events: make abort_controller event trusted
...
The AbortController abort event is trusted, currently we fire all
events with isTrusted: false. Allow dispatching events
internally with `isTrusted: true` and add a test for it.
Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com >
Fixes: https://github.com/nodejs/node/issues/35748
PR-URL: https://github.com/nodejs/node/pull/35811
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-30 12:00:01 +02:00
Rich Trott
e93615c5e3
doc: make AbortSignal text consistent in events.md
...
Further minor modifications to AbortSignal text in events.md for
consistency.
PR-URL: https://github.com/nodejs/node/pull/35005
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-04-30 12:00:00 +02:00
Rich Trott
1a362d8d4b
doc: revise AbortSignal text and example using events.once()
...
Add a line to the example code to clarify what happens if an event is
emitted after listening is canceled. Make minor revisions to surrounding
text.
PR-URL: https://github.com/nodejs/node/pull/35005
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-04-30 11:59:59 +02:00
James M Snell
3f33b5a89e
events: allow use of AbortController with on
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/34912
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2021-04-30 11:59:57 +02:00
James M Snell
1fefb5cb75
events: allow use of AbortController with once
...
Allows an AbortSignal to be passed in to events.once() to cancel
waiting on an event.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/34911
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-30 11:59:56 +02:00
Anna Henningsen
4b04bb87f6
timers: use AbortController with correct name/message
...
On the web, `AbortError` is the error name, not the error
message. Change the code to match that.
PR-URL: https://github.com/nodejs/node/pull/34763
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-30 11:59:54 +02:00
James M Snell
9660a78278
timers: move promisified timers implementations
...
Move the promisified timers implementations into a new internal.
submodule.
Also adds `ref` option to the promisified versions.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33950
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-04-30 11:59:52 +02:00
Denys Otrishko
59a8425d04
timers: fix multipleResolves in promisified timeouts/immediates
...
After successful timer finish the abort event callback would still
reject (already resolved promise) upon calling abortController.abort().
Signed-off-by: Denys Otrishko <shishugi@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33949
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-04-30 11:59:50 +02:00
James M Snell
84b2863f00
timers: allow promisified timeouts/immediates to be canceled
...
Using the new experimental AbortController...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33833
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2021-04-30 11:59:48 +02:00
James M Snell
f30f9314c8
lib: initial experimental AbortController implementation
...
AbortController impl based very closely on:
https://github.com/mysticatea/abort-controller
Marked experimental.
Not currently used by any of the existing promise apis.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33527
Backport-PR-URL: https://github.com/nodejs/node/pull/38386
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-04-30 11:59:44 +02:00
Anna Henningsen
8d4936da2c
repl: fix error message printing
...
The REPL implementation would strip away the first and last character
of a formatted error message if it ended with `]` (but with the
obviously missing check for a starting `]`), leading to things like
`Uncaught rror: foo[a` being printed for input like `Error: foo[a]`.
Refs: https://github.com/nodejs/node/pull/22436
PR-URL: https://github.com/nodejs/node/pull/38209
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-04-29 10:24:47 -04:00
Myles Borins
a7da993cff
doc: stabilize packages features
...
These features are being used in production and are ready to be
considered stable.
Refs: https://github.com/nodejs/modules/issues/564
PR-URL: https://github.com/nodejs/node/pull/35742
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-29 10:22:31 -04:00
Guy Bedford
b133034735
doc: stabilize subpath patterns
...
PR-URL: https://github.com/nodejs/node/pull/36177
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-28 18:00:47 -04:00
Anna Henningsen
1ac07b2aee
repl: disable blocking completions by default
...
It’s not okay for the REPL to be blocked for multiple seconds after
entering `require('` because the completion is performing blocking
fs operations on potentially huge directories. Turning the REPL
completion function asynchronous would be the right thing to do here,
but unfortunately the way the code is structured doesn’t play well
with that (in particular, it breaks the preview feature).
Therefore, disable these blocking calls by default.
Refs: https://github.com/nodejs/node/pull/33282#issuecomment-733646794
PR-URL: https://github.com/nodejs/node/pull/36564
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-04-28 10:06:43 -04:00
Michael Dawson
8413759d84
node-api: fix crash in finalization
...
Refs: https://github.com/nodejs/node-addon-api/issues/906
Refs: https://github.com/nodejs/node/pull/37616
Fix crash introduced by https://github.com/nodejs/node/pull/37616
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/37876
Backport-PR-URL: https://github.com/nodejs/node/pull/37802
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-26 12:42:33 +02:00
Gabriel Schulhof
6e018559db
node-api: stop ref gc during environment teardown
...
A gc may happen during environment teardown. Thus, during finalization
initiated by environment teardown we must remove the V8 finalizer
before calling the Node-API finalizer.
Fixes: https://github.com/nodejs/node/issues/37236
PR-URL: https://github.com/nodejs/node/pull/37616
Backport-PR-URL: https://github.com/nodejs/node/pull/37802
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-04-26 12:42:24 +02:00
Gabriel Schulhof and Chengzhong Wu
b5b1ad39dd
node-api: force env shutdown deferring behavior
...
The finalizer normally never gets called while a reference is strong.
However, during environment shutdown all finalizers must get called. In
order to unify the deferring behavior with that of a regular
finalization, we must force the reference to be weak when we call its
finalizer during environment shutdown.
Fixes: https://github.com/nodejs/node/issues/37236
Co-authored-by: Chengzhong Wu <legendecas@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37303
Backport-PR-URL: https://github.com/nodejs/node/pull/37802
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-04-26 12:42:05 +02:00
Andrew Casey
5a3e12b1ee
doc: update fs.l/statSync API history for throwIfNoEntry
...
PR-URL: https://github.com/nodejs/node/pull/36882
Backport-PR-URL: https://github.com/nodejs/node/pull/36921
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-26 09:28:43 +02:00
Andrew Casey
5e77bcd3dc
lib: add throws option to fs.f/l/statSync
...
For consumers that aren't interested in *why* a `statSync` call failed,
allocating and throwing an exception is an unnecessary expense. This PR
adds an option that will cause it to return `undefined` in such cases
instead.
As a motivating example, the JavaScript & TypeScript language service
shared between Visual Studio and Visual Studio Code is stuck with
synchronous file IO for architectural and backward-compatibility
reasons. It frequently needs to speculatively check for the existence
of files and directories that may not exist (and cares about file vs
directory, so `existsSync` is insufficient), but ignores file system
entries it can't access, regardless of the reason.
Benchmarking the language service is difficult because it's so hard to
get good coverage of both code bases and user behaviors, but, as a
representative metric, we measured batch compilation of a few hundred
popular projects (by star count) from GitHub and found that, on average,
we saved about 1-2% of total compilation time. We speculate that the
savings could be even more significant in interactive (language service
or watch mode) scenarios, where the same (non-existent) files need to be
polled over and over again. It's not a huge improvement, but it's a
very small change and it will affect a lot of users (and CI runs).
For reference, our measurements were against `v12.x` (3637a061a at the
time) on an Ubuntu Server desktop with an SSD.
PR-URL: https://github.com/nodejs/node/pull/33716
Backport-PR-URL: https://github.com/nodejs/node/pull/36921
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-04-26 09:28:39 +02:00
Robert Nagy
443cacee5f
fs: remove custom Buffer pool for streams
...
The performance benefit of using a custom pool are negligable.
Furthermore, it causes problems with Workers and transferrable.
Rather than further adding complexity for compat with Workers,
just remove the pooling logic.
Refs: https://github.com/nodejs/node/issues/33880#issuecomment-644430693
Fixes: https://github.com/nodejs/node/issues/31733
PR-URL: https://github.com/nodejs/node/pull/33981
Backport-PR-URL: https://github.com/nodejs/node/pull/38397
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2021-04-26 09:17:24 +02:00
Michaël Zasso
f62b138278
build: fix label-pr workflow
...
PR-URL: https://github.com/nodejs/node/pull/38399
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-25 19:13:38 +02:00
Phillip Johnsen
1250db9206
build: label PRs with GitHub Action instead of nodejs-github-bot
...
Main goal of using a GitHub Action for labelling PRs has been to move
the mapping between files changed -> label into a configuration file
local to the nodejs/node repository.
Previously any changes to that mapping meant having to grasp the
nodejs/github-bot project, open a PR with the neccessary changes, get
approval from its maintainers before those changes finally got pushed
to production.
The logic involved in using the file paths / label configuration and
resolving the labels to be applied, has been moved into a custom GitHub
Action project: nodejs/node-pr-labeler.
Aside from removing the external dependency the nodejs-github-bot is in
practise, it also reduces the bar for contributors since the resulting
project is a lot smaller and less complex than nodejs/github-bot.
PR-URL: https://github.com/nodejs/node/pull/38301
Fixes: https://github.com/nodejs/github-bot/issues/294
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-25 08:27:10 +02:00
bcoe
b01c496e34
errors: do not call resolve on URLs with schemes
...
We were incorrectly trying to run path.resolve on absolute
sources URLs. This was breaking webpack:// URLs in stack
trace output.
Refs: https://github.com/nodejs/node/issues/35325
PR-URL: https://github.com/nodejs/node/pull/35903
Backport-PR-URL: https://github.com/nodejs/node/pull/37717
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-25 08:25:54 +02:00
James M Snell
08f9130888
crypto: implement randomuuid
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36729
Backport-PR-URL: https://github.com/nodejs/node/pull/36945
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
2021-04-25 08:24:22 +02:00
Antoine du Hamel
7c9f3a9d0c
doc: fix module.isPreloading documentation
...
Fixes: https://github.com/nodejs/node/issues/36775
PR-URL: https://github.com/nodejs/node/pull/36944
Backport-PR-URL: https://github.com/nodejs/node/pull/36988
Refs: https://github.com/nodejs/node/pull/36263
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-04-25 08:22:22 +02:00
James M Snell
2413907a12
module: add isPreloading indicator
...
Adds a `module.isPreloading` property that is `true` only during the
preload (`-r`) phase of Node.js bootstrap. This provides modules an
easy, non-hacky way of knowing if they are being loaded during preload.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36263
Backport-PR-URL: https://github.com/nodejs/node/pull/36988
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-25 08:22:12 +02:00
Gabriel Schulhof
36abc1802c
node-api: define version 8
...
Mark as stable the APIs that define Node-API version 8.
PR-URL: https://github.com/nodejs/node/pull/37652
Backport-PR-URL: https://github.com/nodejs/node/pull/37728
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2021-04-25 07:18:11 +02:00
Rich Trott
cd1da67295
test: fix flaky test-http2-respond-file-error-pipe-offset
...
Fixes: https://github.com/nodejs/node/issues/35881
PR-URL: https://github.com/nodejs/node/pull/36305
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-04-25 07:17:12 +02:00
Guy Bedford
c1af59384d
doc: mark modules implementation as stable
...
PR-URL: https://github.com/nodejs/node/pull/35781
Backport-PR-URL: https://github.com/nodejs/node/pull/37719
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
2021-04-24 20:43:13 +02:00
Qingyu Deng
9930b6b825
doc: update buffer.constants.MAX_LENGTH
...
Fixes: https://github.com/nodejs/node/issues/38093
PR-URL: https://github.com/nodejs/node/pull/38109
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Backport-PR-URL: https://github.com/nodejs/node/pull/38232
2021-04-24 14:29:36 +02:00
Ruy Adorno
fc8f1b7f0a
deps: upgrade npm to 6.14.13
...
PR-URL: https://github.com/nodejs/node/pull/38214
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-04-24 14:26:32 +02:00
Guy Bedford
0c1e878c4c
deps: backport v8 f19142e6
...
[top-level-await] Implement the new post-order requirement for
async subgraphs
Refs: https://github.com/v8/v8/commit/f19142e6139979da3a177cb0b9f382e459f5ccec
PR-URL: https://github.com/nodejs/node/pull/37864
Backport-PR-URL: https://github.com/nodejs/node/pull/37973
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-14 18:15:32 +02:00
Guy Bedford
dd5da301c8
deps: backport v8 5f90cfd7
...
[torque] Move SourceTextModule flags definitions to Torque
Refs: https://github.com/v8/v8/commit/5f90cfd754b96bd74690c2e2ab40f070bb620aa6
PR-URL: https://github.com/nodejs/node/pull/37973
Reviewed-By: Richard Lau <rlau@redhat.com >
2021-04-14 18:13:28 +02:00
Guy Bedford
d56079ab9b
deps: update to cjs-module-lexer@1.1.1
...
PR-URL: https://github.com/nodejs/node/pull/38002
Backport-PR-URL: https://github.com/nodejs/node/pull/37992
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-04-14 17:17:43 +02:00
Matteo Collina
f70aee03ab
http: set lifo as the default scheduling strategy in Agent
...
PR-URL: https://github.com/nodejs/node/pull/36685
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-14 13:16:43 +02:00
BoHong Li
866e3244da
deps: V8: cherry-pick cf71540c684c
...
Original commit message:
mac/arm64: Port SignalHandler::FillRegisterState().
Bug: chromium:1098899
Change-Id: I3ff79c00063f7da36b141a3a7b0d2daa71c9801a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270705
Commit-Queue: Peter Marshall <petermarshall@chromium.org >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
Auto-Submit: Nico Weber <thakis@chromium.org >
Cr-Commit-Position: refs/heads/master@{#68568}
Refs: https://github.com/v8/v8/commit/cf71540c684c54d0d8e1a5aad13f7c4a8d9a3c12
PR-URL: https://github.com/nodejs/node/pull/38051
Refs: https://github.com/nodejs/node/pull/35415
Fixes: https://github.com/nodejs/node/issues/38005
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2021-04-11 12:38:20 +02:00
Antoine du Hamel and BoHong Li
16b59c62ff
deps: cherry-pick 8957d4677aa794c230577f234071af0 from V8 upstream
...
Original commit message:
Fix GetSharedLibraryAddresses
This patch fixes a segmentation fault which occurs when using `--prof` flag on a Darwin ARM64 architecture.
See https://github.com/nodejs/node/issues/36656
Change-Id: Idc3ce6c8fd8a24f76f1b356f629e37340045b51e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609413
Reviewed-by: Ulan Degenbaev <ulan@chromium.org >
Reviewed-by: Michael Lippautz <mlippautz@chromium.org >
Commit-Queue: Ulan Degenbaev <ulan@chromium.org >
Cr-Commit-Position: refs/heads/master@{#72886}
Refs: https://github.com/v8/v8/commit/8957d4677aa794c230577f234071af0dadb88f7b
Fixes: https://github.com/nodejs/node/issues/36656
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37471
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Ash Cripps <acripps@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-04-11 12:37:06 +02:00
Matin Zadehdolatabad and BoHong Li
5707adaf33
deps: V8: cherry-pick 0c8b6e415c30
...
Original commit message:
[mac][wasm] Work around MacOS 11.2 code page decommit failures
MacOS 11.2 refuses to set "no access" permissions on memory that
we previously used for JIT-compiled code. It is still unclear
whether this is WAI on the part of the kernel. In the meantime,
as a workaround, we use madvise(..., MADV_FREE_REUSABLE) instead
of mprotect(..., NONE) when discarding code pages. This is inspired
by what Chromium's gin platform does.
Fixed: v8:11389
Change-Id: I866586932573b4253002436ae5eee4e0411c45fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679688
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org >
Commit-Queue: Michael Lippautz <mlippautz@chromium.org >
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org >
Reviewed-by: Michael Lippautz <mlippautz@chromium.org >
Cr-Commit-Position: refs/heads/master@{#72559}
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com >
Refs: https://github.com/v8/v8/commit/0c8b6e415c3020a987d2287f1543d629cd993535
Fixes: https://github.com/nodejs/node/issues/37061
PR-URL: https://github.com/nodejs/node/pull/37276
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ash Cripps <acripps@redhat.com >
2021-04-11 12:35:52 +02:00
Ash Cripps and BoHong Li
db04ae6b02
test: add SIGTRAP to test-signal-handler
...
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36368
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2021-04-11 12:34:14 +02:00
Ole André Vadla Ravnås and BoHong Li
7d247f1691
deps: V8: cherry-pick 1d0f426311d4
...
Original commit message:
[mac-arm64] Fix missing #include
For an "#if defined(MAP_JIT)" test to work as expected, <sys/mman.h>
must be included in the compilation unit.
Bug: chromium:1144200
Change-Id: Ia0bf35ec1872c02457f1fbc0ee6689c7f7d27d4a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2517689
Reviewed-by: Clemens Backes <clemensb@chromium.org >
Reviewed-by: Igor Sheludko <ishell@chromium.org >
Reviewed-by: Nico Weber <thakis@chromium.org >
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org >
Cr-Commit-Position: refs/heads/master@{#70986}
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35986
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-04-11 12:33:07 +02:00
Ole André Vadla Ravnås and BoHong Li
14a87a5a01
deps: V8: cherry-pick 4e077ff0444a
...
Original commit message:
[mac] Set MAP_JIT only when necessary
This is a "minimal" change to achieve the required goal: seeing that
there is only one place where we need to indicate that memory should
be reserved with MAP_JIT, we can add a value to the Permissions enum
instead of adding a second, orthogonal parameter.
That way we avoid changing public API functions, which makes this CL
easier to undo once we have platform-independent w^x in Wasm.
Bug: chromium:1117591
Change-Id: I6333d69ab29d5900c689f08dcc892a5f1c1159b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2435365
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org >
Reviewed-by: Michael Lippautz <mlippautz@chromium.org >
Reviewed-by: Clemens Backes <clemensb@chromium.org >
Cr-Commit-Position: refs/heads/master@{#70379}
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35986
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-04-11 12:30:06 +02:00
Ole André Vadla Ravnås and BoHong Li
507c2f2101
deps: V8: cherry-pick 086eecbd96b6
...
Original commit message:
[platform] Add Permission::kNoAccessWillJitLater enum value
This value is unused for now. This CL is part 1 of a 3-step dance.
Part 2 will be teaching Chrome's Platform implementation to accept
the new value. Part 3 will then actually use it in V8.
Bug: chromium:1117591
Change-Id: Ie3aed20d4cc58f3def3be2a3a03bba4c3a37bf44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2450056
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org >
Reviewed-by: Michael Lippautz <mlippautz@chromium.org >
Cr-Commit-Position: refs/heads/master@{#70335}
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35986
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-04-11 12:29:21 +02:00
Ole André Vadla Ravnås and BoHong Li
31f8610a02
deps: V8: cherry-pick 27e1ac1a79ff
...
Original commit message:
[wasm][mac] Support w^x codespaces for Apple Silicon
Apple's upcoming arm64 devices will prevent rwx access to memory,
but in turn provide a new per-thread way to switch between write
and execute permissions. This patch puts that system to use for
the WebAssembly subsystem.
The approach relies on CodeSpaceWriteScope objects for now. That
isn't optimal for background threads (which could stay in "write"
mode permanently instead of toggling), but its simplicity makes
it a good first step.
Background:
https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon
Bug: chromium:1117591
Change-Id: I3b60f0efd34c0fed924dfc71ee2c7805801c5d42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378307
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org >
Reviewed-by: Michael Lippautz <mlippautz@chromium.org >
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org >
Cr-Commit-Position: refs/heads/master@{#69791}
Backport-PR-URL: https://github.com/nodejs/node/pull/38051
Co-authored-by: BoHong Li <a60814billy@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35986
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-04-11 12:27:47 +02:00
Michaël Zasso
6b115d762d
deps: patch V8 to 8.4.371.23
...
Refs: https://github.com/v8/v8/compare/8.4.371.19...8.4.371.23
PR-URL: https://github.com/nodejs/node/pull/38001
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2021-04-06 15:53:41 -04:00
Guy Bedford
a92ecf0081
deps: v8 backport 9689b17687b
...
[top-level-await] Implement spec fix for cycle root detection
Refs: http://github.com/v8/v8/commit/9689b17687b21c800c3f7400df4255c55b9c6ec0
PR-URL: https://github.com/nodejs/node/pull/37865
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-04-06 15:53:41 -04:00
bcoe
3c37f896a4
errors: print original exception context
...
When --enable-source-maps is set, the error context displayed
above the stack trace now shows original source rather than
transpiled.
Backport-PR-URL: https://github.com/nodejs/node/pull/37700
PR-URL: https://github.com/nodejs/node/pull/33491
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2021-04-06 15:53:41 -04:00
Michaël Zasso
4bb5c10915
tools: cleanup old ICU version-specific fixes
...
Our current minimum ICU is 67, so we don't need to support those anymore
PR-URL: https://github.com/nodejs/node/pull/36980
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-06 15:53:41 -04:00
Michaël Zasso
c975a8ded1
doc: fix maintaining ICU guide
...
PR-URL: https://github.com/nodejs/node/pull/36980
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-06 15:53:41 -04:00
Michaël Zasso
3e8ceed0eb
deps: update ICU to 68.2
...
Refs: https://github.com/unicode-org/icu/releases/tag/release-68-2
PR-URL: https://github.com/nodejs/node/pull/36980
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-04-06 15:53:40 -04:00
Richard Lau
77f32ee8f7
tools: fix md5 hash for ICU 68.1 src
...
Correct md5sum hash for the tarball version of the ICU 68.1 source.
The previously recorded md5sum hash was for the zip version.
PR-URL: https://github.com/nodejs/node/pull/36777
Fixes: https://github.com/nodejs/node/issues/36776
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-04-06 15:53:40 -04:00