Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe retain override now stores the original ChangesRetain override
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The override now returns the object produced by Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. A rabbit checks the retain call, Comment |
Summary
Generated Objective-C subclasses override
retainwith an IMP declared as a void-returning block even though the installed method is encoded@@:andretainmust return the object. Make both the original IMP function pointer and replacement block returnid.Reproduction and verification
On an Intel/x86_64 macOS 15.7.9 host with Xcode 16.4 and an iOS 18.6 iPhone 16 Plus Simulator, a NativeScript 9.1.0 app crashed at
-[UIApplication setDelegate:]before UI. LLDB showed the NativeScript-generated delegate'sretainIMP returning an invalid object pointer. The same crash occurred in Debug and Release builds and in a clean base app unrelated to the feature being tested.Rebuilding the 9.1.0 runtime with this three-line return-type correction allowed the installed app to launch. Its native Files picker then restored a 30,695,814-byte JSON backup (1,700 workout rows, 243 tombstones) and exported a 30,695,812-byte backup whose canonical data matched the input. This is simulator evidence from the 9.1.0 source; I have not run the upstream
maintest suite and cannot claim Apple Silicon or device verification.Related: #292 reports an Intel simulator startup crash, though that issue does not include a matching stack trace.
Scope
This changes only the ABI declaration for the generated
retainoverride. It does not alter retain-count policy or release behavior. PR #403 touches the same section and currently retains the void return signature; this change may need to be carried through that refactor.Summary by CodeRabbit