fix(v8engine): handle nil logger and module download errors#253
fix(v8engine): handle nil logger and module download errors#253denisraison wants to merge 1 commit into
Conversation
Two latent issues in V8ScriptContext: 1. DownloadModule called InstantiateModule even when the prior download returned an error, causing a nil-deref. Return the download error. 2. logger() dereferenced host.logger unconditionally. Fall back to the default logger when nil so callers don't need to set one up.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
Problem
Two latent issues in
V8ScriptContextI ran into while wiring up a test harness:DownloadModulecallsInstantiateModuleeven when the prior download returned an error, causing a nil-deref on the failed result.logger()dereferenceshost.loggerunconditionally, so any caller that hasn't set one up panics.Fix
DownloadModulewhen the download errored.slog.Default()whenhost.loggeris nil.Two-line-ish changes, no API surface affected.