| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Init assigns isolate_ only after the context and its bindings are set up, so from construction until then the member holds an indeterminate value. The destructor and GetIsolate() read it unconditionally, and currentRuntime_ already points at the runtime from the constructor on. Initialize it to nullptr, like napiEnv_, so a runtime that has not completed Init reports no isolate instead of garbage.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 84f12433-cbba-4169-815b-b42aa0e91084 📥 CommitsReviewing files that changed from the base of the PR and between 686157b and c3f83a8. 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 Walkthrough WalkthroughThe Runtime class now initializes isolate_ to nullptr at declaration. This prevents the member from remaining uninitialized before CreateIsolate assigns it. ChangesRuntime initialization
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to c3f83 This localized lifecycle-safety fix gives Runtime::isolate_ a defined null state before initialization without changing behavior after successful setup. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: edusperoni, nathanwalker Poem 🚥 Pre-merge checks | ✅ 4 | ❌ 1 ❌ Failed checks (1 warning)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Runtime::isolate_ is only assigned near the end of Init, after the context and its bindings are set up, so between construction and that point it holds an indeterminate value. ~Runtime and GetIsolate() read it unconditionally, and currentRuntime_ already points at the runtime from the constructor on, so anything that reaches the runtime before Init finishes gets garbage rather than null.
This initializes it to nullptr, the same way napiEnv_ next to it already is. No change for a runtime that completed Init.
Summary by CodeRabbit