nodejs / nodejs/nan

Weak tests incompatible with V8 change

Open
#995 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.4k
Forks
531
Avg merge
21m
Merged PRs (30d)
1

Description

A recent V8 change, 4733273: [heap] Disallow JS execution in second pass callbacks., makes a strict change to WeakCallbackInfo::SetSecondPassCallback:

The second pass callback is prohibited from executing JavaScript. Embedders should schedule another callback in case this is required.

This condition is enforced at runtime and results in a crash. This change conflicts with NAN's weak tests, both written to run JS in the weak callback.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/js/weak-test.js and test/js/weak2-test.js, then read the linked V8 change to understand the second-pass callback restriction. Determine how the tests currently execute JavaScript from weak callbacks; done means both tests avoid that prohibited execution and pass under the changed V8 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.