Skip to content

src,test,tools: forbid usage of v8::Persistent

src,test: use v8::Global instead of v8::Persistent

This is in preparation for a lint rule forbidding usage of v8::Persistent.

doc: avoid using v8::Persistent in addon docs

Use v8::Global where possible. For examples where it applies, also clean up the code and make the code multi-threading-ready, for those where that isn’t easily possible, add a warning about that.

tools,src: forbid usage of v8::Persistent

v8::Persistent comes with the surprising catch that it requires manual cleanup. v8::Global doesn’t, making it easier to use, and additionally provides move semantics. New code should always use v8::Global.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading