Skip to content

Account for deprecated GetPrototypeV2() and HolderV2() in v8 14.7#6470

Merged
vickykont merged 1 commit intomainfrom
vasiliki/account-for-v8-deprecation
Apr 1, 2026
Merged

Account for deprecated GetPrototypeV2() and HolderV2() in v8 14.7#6470
vickykont merged 1 commit intomainfrom
vasiliki/account-for-v8-deprecation

Conversation

@vickykont
Copy link
Copy Markdown
Contributor

@vickykont vickykont requested review from a team as code owners March 31, 2026 21:22
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

I'm Bonk, and I've done a quick review of your PR.

Adds #if guards to replace deprecated V8 GetPrototypeV2() and HolderV2() with their renamed counterparts (GetPrototype() and Holder()) for V8 >= 14.7.

  1. [LOW] #define HolderV2 Holder in resource.h is never #undef'd. Since this is a header file, the macro leaks into every translation unit that includes it. Today this is harmless because HolderV2 is only used within resource.h itself, but it's poor hygiene and could cause surprising breakage if the token ever appears elsewhere. Adding an #undef after the last use site would tighten the scope.

This review was generated by an AI assistant and may contain inaccuracies.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 31, 2026

I'm Bonk, and I've done a quick review of your PR.

The changes add #if preprocessor guards across four files to replace deprecated V8 14.7 APIs (GetPrototypeV2()GetPrototype(), HolderV2()Holder()), keeping the old calls for the current V8 14.6. The approach is correct and the version checks are accurate.

I posted one low-severity finding: the #define HolderV2 Holder macro in resource.h is never #undef'd, which means it leaks into all translation units that include the header. It's harmless today but should be cleaned up for good hygiene.

github run

@erikcorry
Copy link
Copy Markdown
Contributor

I think Bonk is being a little overeager here. We will remove this #define soon, so if it works today that's fine.

@vickykont vickykont merged commit 75386fb into main Apr 1, 2026
31 checks passed
@vickykont vickykont deleted the vasiliki/account-for-v8-deprecation branch April 1, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants