Skip to content

[v9.x] deps: cherry-pick c3458a8 from upstream V8

Original commit message:

[parser] Add new FunctionNameInferrer state before parsing param

Create new state before parsing FormalParameter because we don't
want to use any of the parameters as an inferred function name.

Previously the stacktrace was:
  test.js:3: Error: boom
      throw new Error('boom');
      ^
  Error: boom
      at param (test.js:3:11)
      at test.js:4:5
      at test.js:6:3

The stacktrace with this patch:
  test.js:3: Error: boom
      throw new Error('boom');
      ^
  Error: boom
      at test.js:3:11
      at test.js:4:5
      at test.js:6:3

Bug: v8:6822, v8:6513
Change-Id: Ifbadc660fc4e85248af405acd67c025f11662bd4
Reviewed-on: https://chromium-review.googlesource.com/742657
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49042}

Refs: https://github.com/v8/v8/commit/c3458a86722d735ef4c4e31f9bcaa966e5093e47 Fixes: https://github.com/nodejs/node/issues/15386

/cc @nodejs/v8

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

V8

Merge request reports

Loading