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

2144 Коммитов

Автор SHA1 Сообщение Дата
Andy Dill 4d44266b78 fix: use zlib from electron_node (#75) 2018-10-16 09:36:01 -07:00
Jeremy Apthorp f14ddf9d7e fix: export libuv symbols (#73)
Closes electron/electron#15075
2018-10-12 10:24:57 +11:00
Jeremy Apthorp 88b494191c
build: add GN build files 2018-10-02 11:36:13 -07:00
Shelley Vohr a5bd5d5407
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-10-02 11:36:13 -07:00
Shelley Vohr 8ba653c77b
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-10-02 11:36:13 -07:00
Daniel Beckert 566075967d
deps: cherry-pick 9a23bdd from upstream V8
Original commit message:

    [Isolate] Fix Isolate::PrintCurrentStackTrace for interpreted frames

    Previously we were getting the code object from the stack, so printed incorrect
    position details for interpreted frames.

    BUG=v8:7916

    Change-Id: I2f87584117d88b7db3f3b9bdbfe793c4d3e33fe9
    Reviewed-on: https://chromium-review.googlesource.com/1126313
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54253}

Refs: 9a23bdd7ea
Refs: https://github.com/nodejs/node/issues/21988
PR-URL: https://github.com/nodejs/node/pull/22910
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-09-20 08:09:24 +02:00
Yang Guo bb3292fd1f
deps: add missing HandleScope in FieldType::PrintTo
Refs: https://github.com/nodejs/node/issues/22775

PR-URL: https://github.com/nodejs/node/pull/22890
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-20 08:09:24 +02:00
Ali Ijaz Sheikh 967fbebf47
deps: cherry-pick 2363cdf from upstream V8
Original commit message:

    [tracing] do not add traces when disabled

    https://github.com/nodejs/node/issues/21038

    Change-Id: Ic4c9f403b5e54a97d3170b2311dd5aab8c8357c8
    Reviewed-on: https://chromium-review.googlesource.com/1217726
    Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#55809}

Refs: 2363cdfefe
PR-URL: https://github.com/nodejs/node/pull/22812
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
2018-09-20 07:41:15 +02:00
Michaël Zasso e85aa19a82
deps: patch V8 to 6.8.275.32
PR-URL: https://github.com/nodejs/node/pull/22682
Refs: https://github.com/v8/v8/compare/6.8.275.30...6.8.275.32
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-07 20:39:00 +02:00
Peter Marshall 6a333999cf
deps: backport detailed line info for CPU profiler
[cpu-profiler] Add flag to always generate accurate line info.
https://chromium.googlesource.com/v8/v8/+/
56baf56790de439b3f69e887e94beb3b301ed77c

[cpu-profiler] Turn on detailed line info for optimized code
https://chromium.googlesource.com/v8/v8/+/
84894ce6d2af7feb9e1f5574409355120887326c

[cpu-profiler] Separate the flags for generating extra line information
https://chromium.googlesource.com/v8/v8/+/
30ff6719db441cc7ef220d449970cc169067e256

PR-URL: https://github.com/nodejs/node/pull/22688
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-07 20:29:48 +02:00
Anna Henningsen 6f14b96bfb
deps: update to nghttp2 1.33.0
Refs: https://github.com/nghttp2/nghttp2/releases/tag/v1.33.0

PR-URL: https://github.com/nodejs/node/pull/22649
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-06 08:54:58 +02:00
Marcel Laverdet 037906b36c
deps: cherry-pick 22116dd from upstream V8
Refs: 22116dd6c8

Original commit message:

    [snapshot] fix resetting function code.

    Unconditionally setting the JSFunction code to that of the SFI
    may skip initializing the feedback vector.

    R=leszeks@chromium.org

    Bug: v8:7857
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I65d4bf32493be4cade2eaf3d665d44f93e80f809
    Reviewed-on: https://chromium-review.googlesource.com/1107618
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53881}

PR-URL: https://github.com/nodejs/node/pull/21992
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-09-06 08:54:57 +02:00
Ben Newman 5e9ed6d924
deps: backport a8f6869 from upstream V8
Original commit message:

  [debug] Fully implement Debug::ArchiveDebug and Debug::RestoreDebug.

  I have a project that embeds V8 and uses a single `Isolate` from multiple
  threads. The program runs just fine, but sometimes the inspector doesn't
  stop on the correct line after stepping over a statement that switches
  threads behind the scenes, even though the original thread is restored by
  the time the next statement is executed.

  After some digging, I discovered that the `Debug::ArchiveDebug` and
  `Debug::RestoreDebug` methods, which should be responsible for
  saving/restoring this `ThreadLocal` information when switching threads,
  currently don't do anything.

  This commit implements those methods using MemCopy, in the style of other
  Archive/Restore methods in the V8 codebase.

  Related: https://groups.google.com/forum/#!topic/v8-users/_Qf2rwljRk8

  R=yangguo@chromium.org,jgruber@chromium.org
  CC=info@bnoordhuis.nl

  Bug: v8:7230
  Change-Id: Id517c873eb81cd53f7216c7efd441b956cf7f943
  Reviewed-on: https://chromium-review.googlesource.com/833260
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Reviewed-by: Yang Guo <yangguo@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#54902}

Refs: a8f6869177

Fix build errors by matching older V8 APIs used by Node.

It looks like

  SetDebugDelegate(debug::DebugDelegate* delegate, bool pass_ownership)

was simplified to just

  SetDebugDelegate(debug::DebugDelegate* delegate)

in 37dcd837db,
but the extra `pass_ownership` parameter is still there in the current
version of `node/deps/v8`. I should be able to fix those tests by passing
`false` for `pass_ownership`.

Also, the `DebugDelegate::BreakProgramRequested` method lost a parameter
in e404670696,
but it's not a parameter I was using in my test, so there shouldn't be any
harm in adding the `exec_state` parameter back to `BreakProgramRequested`
(and continuing to ignore it).

Skip restoring debug state unless thread previously in DebugScope.

A simpler version of the changes I proposed upstream in this V8 change
request: https://chromium-review.googlesource.com/c/v8/v8/+/1168449

In this version, Debug::RestoreDebug never attempts to enter a new
DebugScope, but merely reuses the previous one, if we're returning to a
thread that was previously in a DebugScope. If the thread was not
previously in a DebugScope, I believe it does not need to have any
debugging state restored with ClearOneShot and PrepareStep.

The tests from https://chromium-review.googlesource.com/c/v8/v8/+/833260
still pass, and the failing V8-CI tests are now passing locally for me.

PR-URL: https://github.com/nodejs/node/pull/22122
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-09-06 08:54:44 +02:00
Ali Ijaz Sheikh 3531aa0fe2
deps: cherry-pick bf5ea81 from upstream V8
Original commit message:

    [tracing] allow dynamic control of tracing

    If the trace_buffer_ was null, we were returning a pointer to a static
    flag back that permanently disabled that particular trace point.

    This implied an assumption that tracing will be statically enabled at
    process startup, and once it is disabled, it will never be enabled
    again. On Node.js side we want to dynamically enable/disable tracing as per
    programmer intent.

    Change-Id: Ic7a7839b8450ab5c356d85e8e0826f42824907f4
    Reviewed-on: https://chromium-review.googlesource.com/1161518
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com>
    Cr-Commit-Position: refs/heads/master@{#54903}

Refs: bf5ea8138c

PR-URL: https://github.com/nodejs/node/pull/22114
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-06 08:54:34 +02:00
Michaël Zasso 29d19fde51
deps: fix V8 test regression
Fixes a regression introduced in a V8 backport PR.
A small change in cctest/test-log.cc was forgotten.

Refs: https://github.com/nodejs/node/pull/22028
Refs: ba752ea4c5

PR-URL: https://github.com/nodejs/node/pull/22677
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-09-06 08:54:25 +02:00
Peter Marshall f354cf85ce
deps: backport 4 CPU profiler commits from upstream V8
[cpu-profiler] Add a new profiling mode with a more detailed call tree.
ecae80cdb3

[cpu-profiler] Reuse free slots in code_entries_
3e1126bf15

[cpu-profiler] Only store deopt inline frames for functions that need it
0bfcbdd472

[cpu-profiler] Use instruction start as the key for the CodeMap
ba752ea4c5

PR-URL: https://github.com/nodejs/node/pull/22028
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com>
2018-09-06 08:54:24 +02:00
Kat Marchán 6d6db603e2
deps: upgrade npm to 6.4.1
PR-URL: https://github.com/nodejs/node/pull/22591
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-06 08:53:57 +02:00
Michaël Zasso 83343f74d4
deps: backport String::Utf8Length with isolate
This overload was added in V8 6.9 and the one without the isolate
parameter was removed in V8 7.0.

Refs: 3dd5c6fe38

PR-URL: https://github.com/nodejs/node/pull/22531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-06 08:53:55 +02:00
Michaël Zasso 9140edfdcd
deps: backport String::Write{OneByte,Utf8} with isolate
These overloads were added in V8 6.9 and the ones without the isolate
parameter were removed in V8 7.0.

Refs: 8a011b57d8

PR-URL: https://github.com/nodejs/node/pull/22531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-06 08:53:44 +02:00
Michaël Zasso 76806e971c
deps: backport StackFrame::GetFrame with isolate
This overload was added in V8 6.9 and the one without isolate was
removed in V8 7.0.

Refs: 8a011b57d8

PR-URL: https://github.com/nodejs/node/pull/22531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-06 08:53:32 +02:00
Michaël Zasso b30b5de85d
src,deps: add isolate parameter to String::Concat
Partially backport an upstream commit that deprecates String::Concat
without the isolate parameter. This overload has already been removed
in V8 7.0.

PR-URL: https://github.com/nodejs/node/pull/22521
Refs: 8a011b57d8
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-06 08:52:56 +02:00
Sam Ruby 6405ad99a9
deps: import acorn@5.7.2
Imported from the tarball published on npm
(https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz).

Update to emcaScript version 10 in order to get support for
binding-less catch statements.

Also needed to parse node.js lib API in #22405.

PR-URL: https://github.com/nodejs/node/pull/22488
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-06 08:52:21 +02:00
Michaël Zasso 611f423e1b
deps: patch V8 to 6.8.275.30
Refs: https://github.com/v8/v8/compare/6.8.275.24...6.8.275.30

PR-URL: https://github.com/nodejs/node/pull/22125
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-09-03 17:56:23 +02:00
cjihrig 90e99dac86
deps: upgrade to libuv 1.23.0
Notable changes:
- Restores compatibility with the old IPC protocol.
- Adds uv_open_osfhandle().
- Adds uv_os_{get,set}priority().

PR-URL: https://github.com/nodejs/node/pull/22365
Fixes: https://github.com/nodejs/node/issues/21671
Fixes: https://github.com/nodejs/node/issues/15433
Refs: https://github.com/nodejs/node/pull/21675
Refs: https://github.com/nodejs/node-addon-api/issues/304
Refs: https://github.com/nodejs/abi-stable-node/issues/318
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-03 17:56:23 +02:00
Ruben Bridgewater fcf422e921 deps: backport c608122b from upstream
Original commit message:
  [api][keys] Allow skipping indices for Proxies with GetPropertyNames

  Bug: v8:7942
  Change-Id: I7b3740b04cbcaa56dc809150900ab8d821b054ce
  Reviewed-on: https://chromium-review.googlesource.com/1156544
  Reviewed-by: Toon Verwaest <verwaest@chromium.org>
  Commit-Queue: Camillo Bruni <cbruni@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#54821}

PR-URL: https://github.com/nodejs/node/pull/22210
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-08-15 20:23:17 +10:00
Shigeki Ohtsu a07ccaeb19 deps: update archs files for OpenSSL-1.1.0i
`cd deps/openssl/config; make` updates all archs dependant files.

PR-URL: https://github.com/nodejs/node/pull/22318
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2018-08-15 20:23:17 +10:00
Shigeki Ohtsu 473996c90f deps: add s390 asm rules for OpenSSL-1.1.0
This is a floating patch against OpenSSL-1.1.0 to generate asm files
with Makefile rules and it is to be submitted to the upstream.

Fixes: https://github.com/nodejs/node/issues/4270
PR-URL: https://github.com/nodejs/node/pull/19794
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-08-15 20:23:17 +10:00
Shigeki Ohtsu 05e48fd018 deps: upgrade openssl sources to 1.1.0i
This updates all sources in deps/openssl/openssl with openssl-1.1.0i.

PR-URL: https://github.com/nodejs/node/pull/22318
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2018-08-15 20:23:17 +10:00
Matheus Marchini f8bc5d6320 deps: cherry-pick 09bca09 from upstream V8
Original commit message:

    [postmortem] add ScopeInfo and Context types

    The metadata introduced in this patch will be useful for postmortem
    tools to inspect Contexts and ScopeInfos (see
    https://github.com/nodejs/llnode/issues/211).

    R=bmeurer@google.com, yangguo@google.com

    Change-Id: I927fcab4014d128bd782046c1ecb9ee045723e95
    Reviewed-on: https://chromium-review.googlesource.com/1153858
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54768}

Refs: https://github.com/v8/v8/commit/09bca095e38d6e4770ae48e174f59d33c

PR-URL: https://github.com/nodejs/node/pull/22068
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-15 20:23:17 +10:00
Peter Marshall c69fdc9d5f deps: remove thread_local to fix V8 compilation
PR-URL: https://github.com/nodejs/node/pull/21668
Fixes: https://github.com/I
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-08-15 20:23:17 +10:00
Michaël Zasso 981fff714e deps: refactor v8.gyp
Mostly reorders lists of source files to match more BUILD.gn.
Fixes a few wrong entries.

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/22017
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-15 20:23:17 +10:00
Peter Marshall 5fa3ffad20 deps: patch the V8 API to be backwards compatible with 6.7
PR-URL: https://github.com/nodejs/node/pull/21668
Fixes: https://github.com/I
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2018-08-15 20:23:17 +10:00
Matheus Marchini 6eed40acbb deps: cherry-pick 804a693 from upstream V8
Original commit message:

    [postmortem] add JS_ERROR_TYPE and context embedder index

      * JS_ERROR_TYPE is required for postmortem tools to inspect
        JSError objects (see https://github.com/nodejs/llnode/pull/215
        for a usage example)
      * The context embedder index is required for postmortem tools to
        access embedder data stored in the context (see
        https://github.com/nodejs/llnode/pull/204 for a usage example)

    R=bmeurer@google.com, yangguo@google.com

    Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
    Reviewed-on: https://chromium-review.googlesource.com/1138493
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54475}

Refs: https://github.com/v8/v8/commit/804a693eb4ac2fed160c683d16444a53b5

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-08-15 20:23:17 +10:00
James M Snell 7eccaf86d6 deps: V8: Backport of 0dd3390 from upstream
Original commit message:

  Reland "[builtins] Add %IsTraceCategoryEnabled and %Trace builtins"

  This is a reland of 8d4572a

  Original change's description:
  > [builtins] Add %IsTraceCategoryEnabled and %Trace builtins
  >
  > Adds the builtin Trace and IsTraceCategoryEnabled functions
  > exposed via extra bindings. These are intended to use by
  > embedders to allow basic trace event support from JavaScript.
  >
  > ```js
  > isTraceCategoryEnabled('v8.some-category')
  >
  > trace('e'.charCodeAt(0), 'v8.some-category',
  >       'Foo', 0, { abc: 'xyz'})
  > ```
  >
  > Bug: v8:7851
  > Change-Id: I7bfb9bb059efdf87d92a56a0aae326650730c250
  > Reviewed-on: chromium-review.googlesource.com/1103294
  > Commit-Queue: Yang Guo <yangguo@chromium.org>
  > Reviewed-by: Yang Guo <yangguo@chromium.org>
  > Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
  > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
  > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
  > Cr-Commit-Position: refs/heads/master@{#54121}

  TBR=cbruni@chromium.org

  Bug: v8:7851
  Change-Id: Id063754b2834b3b6a2b2654e76e8637bcd6aa5f8
  Reviewed-on: chromium-review.googlesource.com/1137071
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Reviewed-by: Yang Guo <yangguo@chromium.org>
  Reviewed-by: Camillo Bruni <cbruni@chromium.org>
  Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#54532}

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21899
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-08-15 20:23:17 +10:00
Michaël Zasso 328c89925a deps: cherry-pick 907d7bc from upstream V8
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <mslekova@chromium.org>
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54309}

Refs: 907d7bcd18

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21838
Refs: https://github.com/nodejs/promises-debugging/issues/8
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com>
2018-08-15 20:23:17 +10:00
Michaël Zasso afacfd2992 deps: cherry-pick 2075910 from upstream V8
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54210}

Refs: 2075910f3d

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21838
Refs: https://github.com/nodejs/promises-debugging/issues/8
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com>
2018-08-15 20:23:17 +10:00
Anna Henningsen 4f24256274 deps: cherry-pick 555c811 from upstream V8
Original commit message:

    [api] Switch from `SetBuildEmbedderGraphCallback` to `AddBuildEmbedderGraphCallback`

    `SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
    assumes a monolithic embedder that can provide all necessary information.
    That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
    instances per V8 Isolate, as well as native addons that may allocate resources
    on their own.

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
    Reviewed-on: https://chromium-review.googlesource.com/1082441
    Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53545}

Refs: 555c811c0d

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21741
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-15 20:23:17 +10:00
Gus Caplan 7b4272a14d deps: cherry-pick 477df06 from upstream v8
Original commit message:

    [API] Expand BigInt API

    Provide a more complete BigInt API.

    Bug: v8:7712
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: Ic8562d616f3125deabdf8b52c7019b191bef0e07
    Reviewed-on: chromium-review.googlesource.com/1101198
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54122}

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21644
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-08-15 20:23:17 +10:00
Matheus Marchini a0bf7aa07c deps: cherry-pick 70c4340 from upstream V8
Original commit message:

    [log][api] Fix GCC 4.9 build failure

    GCC 4.9 used on some Node.js CI machines complains when the control
    reaches the end of a non-void function and no return is encountered.

    R=bmeurer@google.com, ofrobots@google.com, yangguo@google.com

    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I5af0192cb187eccbf34dbb60ff3ac2e4774af803
    Reviewed-on: https://chromium-review.googlesource.com/1105619
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53861}

Refs: https://github.com/v8/v8/commit/70c43402ee04d482ff64e186e2faf43fe

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21126
Refs: https://github.com/v8/v8/commit/aa6ce3e
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-15 20:23:17 +10:00
Matheus Marchini 4994ac65b0 deps: cherry-pick acc336c from upstream V8
Original commit message:

    [log] fix boolean logic on LogCodeObject

    R=yangguo@google.com

    Change-Id: Icb4825344991e5b2d15050e037064c60eeb9617e
    Reviewed-on: https://chromium-review.googlesource.com/1097578
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53777}

Refs: https://github.com/v8/v8/commit/acc336c1257cc7ceee4b31094ee1e9e41

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21126
Refs: https://github.com/v8/v8/commit/aa6ce3e
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-15 20:23:17 +10:00
Matheus Marchini be569f82f1 deps: cherry-pick b20faff from upstream V8
Original commit message:

    [log] fix ExistingCodeLogger behavior on edge case

    ExistingCodeLogger was behaving incorrectly when the
    CodeEventHandler API was used in combination with
    --interpreted-frames-native-stack.  Instead of collecting copied
    trampolines as InterpretedFunction:functionName, they were being
    collected as Builtin:IntepreterEntryTrampolines.  This patch adds
    special handling for copied trampolines when using
    ExistingCodeLogger.

    R=yangguo@google.com

    Change-Id: I3ee4be03800122d28d53b51b20c60dcf6263e4c1
    Reviewed-on: https://chromium-review.googlesource.com/1087813
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53624}

Refs: https://github.com/v8/v8/commit/b20faffb07bc97b869a00b935c639bd1c

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21126
Refs: https://github.com/v8/v8/commit/aa6ce3e
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-15 20:23:17 +10:00
Michaël Zasso 6df5feb13f deps: cherry-pick aa6ce3e from upstream V8
Original commit message:

    [log][api] introduce public CodeEventListener API

    Introduce a new public API called CodeEventListener to allow embedders
    to better support external profilers and other diagnostic tools without
    relying on unsupported methods like --perf-basic-prof.

    Bug: v8:7694
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I063cc965394d59401358757634c9ea84c11517e9
    Co-authored-by: Daniel Beckert <daniel@sthima.com.br>
    Reviewed-on: https://chromium-review.googlesource.com/1028770
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Hannes Payer <hpayer@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Andreas Haas <ahaas@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53382}

Refs: aa6ce3ee61

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-08-15 20:23:17 +10:00
Matheus Marchini 8b9a956f9e deps: cherry-pick 5dd3395 from upstream V8
Original commit message:

    [log] improve --perf-basic-prof-only-functions

    Change --perf-basic-prof-only-functions to also log builtin code
    creation events, otherwise InterpretedFunctions generated by
    --interpreted-frames-native-stack will be filtered out.

    R=yangguo@google.com

    Change-Id: Ib0623fca88e25c514473a43de56ebbbdcb146f97
    Reviewed-on: https://chromium-review.googlesource.com/1100014
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#53760}

Refs: https://github.com/v8/v8/commit/5dd33955d5cb1d84dd2509363e11d3c2a

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21386
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-15 20:23:17 +10:00
Michaël Zasso 548008a6f6 deps: update v8.gyp and run Torque
Synchronize source files list with upstream's BUILD.gn.

Teach v8.gyp to build and run torque, V8's DSL for generating builtins.

On Windows, the torque binary needs to be compiled and linked
with exception semantics and assume V8 is embedded.

Fixes: https://github.com/nodejs/node-v8/issues/57

Co-Authored-By: Ben Noordhuis <info@bnoordhuis.nl>
Co-Authored-By: Refael Ackermann <refack@gmail.com>

Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-08-15 20:23:17 +10:00
Michaël Zasso 9c74271a96 deps: update V8 to 6.8.275.24
Backport-PR-URL: https://github.com/nodejs/node/pull/21668
PR-URL: https://github.com/nodejs/node/pull/21079
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-08-15 20:23:17 +10:00
Kat Marchán 87ed6e6351
deps: upgrade npm to 6.2.0
PR-URL: https://github.com/nodejs/node/pull/21592
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-07-31 09:35:46 +02:00
João Reis e0f3d5703a
build,win,v8: allow precompiling objects-inl.h
This makes compiling v8_base much faster on Windows.

Sharding is disabled because the header would have to be precompiled
for each shard but is only once. The library is much smaller, so
sharding is unnecessary.

This is enabled by default, but disabled for CI and releases.

PR-URL: https://github.com/nodejs/node/pull/21772
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2018-07-31 09:35:46 +02:00
Matheus Marchini f868415cf6
deps: cherry-pick 804a693 from upstream V8
Original commit message:

    [postmortem] add JS_ERROR_TYPE and context embedder index

      * JS_ERROR_TYPE is required for postmortem tools to inspect
        JSError objects (see https://github.com/nodejs/llnode/pull/215
        for a usage example)
      * The context embedder index is required for postmortem tools to
        access embedder data stored in the context (see
        https://github.com/nodejs/llnode/pull/204 for a usage example)

    R=bmeurer@google.com, yangguo@google.com

    Change-Id: Ib7c7eb44f6ad327fc71a1d45f510c49377db7a25
    Reviewed-on: https://chromium-review.googlesource.com/1138493
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54475}

Refs: https://github.com/v8/v8/commit/804a693eb4ac2fed160c683d16444a53b5

PR-URL: https://github.com/nodejs/node/pull/21855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
2018-07-26 09:25:54 +02:00
James M Snell b56c8ad879
deps: V8: Backport of 0dd3390 from upstream
Original commit message:

  Reland "[builtins] Add %IsTraceCategoryEnabled and %Trace builtins"

  This is a reland of 8d4572a

  Original change's description:
  > [builtins] Add %IsTraceCategoryEnabled and %Trace builtins
  >
  > Adds the builtin Trace and IsTraceCategoryEnabled functions
  > exposed via extra bindings. These are intended to use by
  > embedders to allow basic trace event support from JavaScript.
  >
  > ```js
  > isTraceCategoryEnabled('v8.some-category')
  >
  > trace('e'.charCodeAt(0), 'v8.some-category',
  >       'Foo', 0, { abc: 'xyz'})
  > ```
  >
  > Bug: v8:7851
  > Change-Id: I7bfb9bb059efdf87d92a56a0aae326650730c250
  > Reviewed-on: chromium-review.googlesource.com/1103294
  > Commit-Queue: Yang Guo <yangguo@chromium.org>
  > Reviewed-by: Yang Guo <yangguo@chromium.org>
  > Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
  > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
  > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
  > Cr-Commit-Position: refs/heads/master@{#54121}

  TBR=cbruni@chromium.org

  Bug: v8:7851
  Change-Id: Id063754b2834b3b6a2b2654e76e8637bcd6aa5f8
  Reviewed-on: chromium-review.googlesource.com/1137071
  Commit-Queue: Yang Guo <yangguo@chromium.org>
  Reviewed-by: Yang Guo <yangguo@chromium.org>
  Reviewed-by: Camillo Bruni <cbruni@chromium.org>
  Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#54532}

PR-URL: https://github.com/nodejs/node/pull/21899
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2018-07-24 20:49:04 +02:00
Michaël Zasso ec0ff7008a
deps: cherry-pick 907d7bc from upstream V8
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <mslekova@chromium.org>
    Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#54309}

Refs: 907d7bcd18

PR-URL: https://github.com/nodejs/node/pull/21838
Refs: https://github.com/nodejs/promises-debugging/issues/8
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com>
2018-07-19 09:49:29 +02:00