Skip to content

Commit e801384

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: batch fix ~40 bugs across codebase
Template fix (affects all 1032 generated methods): - Fix callErr variable shadowing: `:=` in closure created new variable that shadowed outer callErr, silently losing JNI errors - Capture vm.Do() return value: thread attach errors were discarded - Both fixes together ensure all JNI errors propagate to callers Code generator fixes: - Handle bare "CharSequence" as string type in ResolveType - Handle CharSequence in mergeParam and mergeCallback isString checks - Remove redundant nil check in Field.GetterName() - Remove redundant MergedMethod.Error field (HasError suffices) Core JNI fixes: - NewString: guard against empty unicodeChars slice panic - DefineClass: guard against empty class bytes panic - GetStringRegion/GetStringUTFRegion: guard against empty buf panic Example resource leak fixes: - accounts: free GlobalRef per account element after use - lights: free GlobalRef per Light and LightState after use - session: free GlobalRef per MediaController after use - print: free GlobalRef for Job and JobInfo after use - usb: remove redundant NewGlobalRef wrapping, free refs after use - power: add missing defer mgr.Close() - ir: remove crash-causing nil pattern Transmit call - location: fix comment saying 15s when code uses 30s Regenerated all packages with template fix applied.
1 parent c17fdb0 commit e801384

181 files changed

Lines changed: 6139 additions & 5162 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

accounts/account.go

Lines changed: 9 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

accounts/account_manager.go

Lines changed: 44 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)