Skip to content

v8: consider cherry-picking 3d750c2 to v24.x #58744

Open
@Renegade334

Description

@Renegade334

13.7.92 contains an explicit resource management fix, v8/v8@3d750c2.

Currently, the feature is broken entirely if the [await] using variable gets bound to a closure, with the disposer never being invoked.

{
  using disposable = {
    [Symbol.dispose]() { console.log('disposed!') },
  };
  // Create an arbitrary closure binding `disposable`
  () => { disposable };
}

When running the above example in v24.x, after the closure is created, V8 does not invoke the disposer on exiting the block.

cc: @targos

Metadata

Metadata

Assignees

No one assigned

    Labels

    v24.xv24.x v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions