Skip to content

refactor: gin_helper::Promise managed by cppgc - #51386

Merged
jkleinsc merged 3 commits into
mainfrom
robo/make_promisebase_cppgc_managed
Apr 30, 2026
Merged

jkleinsc merged 3 commits into
mainfrom
robo/make_promisebase_cppgc_managed

Conversation

@deepak1556

Copy link
Copy Markdown
Member

Description of Change

Refs #47922

Release Notes

Notes: none

@deepak1556 deepak1556 added semver/patch backwards-compatible bug fixes target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 29, 2026
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Apr 29, 2026
@deepak1556

Copy link
Copy Markdown
Member Author

I still want to remove the raw_ptr v8::isolate exposed from PromiseBase as the current assumption is the callbacks using the promise don't get invoked after isolate is destroyed which may not be the case. But this should be a followup refactor.

@deepak1556
deepak1556 requested a review from ckerr April 29, 2026 11:58
Comment thread spec/cpp-heap-spec.ts Resolved
@deepak1556
deepak1556 requested a review from ckerr April 29, 2026 17:51
Comment on lines +132 to +133
return IsAlive() ? handle_->GetResolver(isolate_)
: v8::Local<v8::Promise::Resolver>();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to put a DCHECK(IsAlive()); here?

It looks like everyone who calls this has already tested for IsAlive() so it might be safer to put a DCHECK() here to warn us if we add future calls forgets to test for it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check the alternative in 9d4b460

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Apr 30, 2026

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding tests!

@jkleinsc
jkleinsc merged commit f6dc41a into main Apr 30, 2026
121 of 123 checks passed
@jkleinsc
jkleinsc deleted the robo/make_promisebase_cppgc_managed branch April 30, 2026 13:48
@release-clerk

release-clerk Bot commented Apr 30, 2026

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "42-x-y", please check out #51405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/42-x-y PR was merged to the "42-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants