Skip to content

Conversation

@huajiqaq
Copy link
Contributor

@huajiqaq huajiqaq commented Feb 10, 2026

描述 / Description

修复当模块mmkv未初始化时调用WeLogger类可能报错的问题 修复有时getUri返回null报错的问题

类型 / Type

  • Bug 修复 / Bug Fix
  • 新功能 / New Feature
  • 文档更新 / Documentation Update
  • 其他(请描述)/ Other (please describe):

修复或解决的问题 / Issues Fixed or Closed by This PR

清单 / Checklist

  • 我已阅读并遵循贡献指南 / I have read and followed the contribution guidelines
  • 我已在本地测试这些更改 / I have tested these changes locally
  • 我已更新相关文档或注释(如适用) / I have updated relevant documentation or comments (if applicable)
  • 我确认此更改不会破坏任何原有功能 / I confirm this change does not break any existing features
  • 我已进行多版本适配(如适用) / I have used MMVersion for version compatibility (if applicable)
  • 我已在多个微信版本上测试此更改(如适用) / I have tested this change on multiple WeChat versions (if applicable)

其他信息 / Additional Information

Introduce native core initialization state (isNativeCoreInitialized / setNativeCoreInitialized) in NativeCoreBridge and use it when initializing MMKV to better track / log init status. Adjust initializeMmkvForPrimaryNativeLibrary to use the new API and set the flag via setter. Update LogUtils to consult the native init state before gating logs, preventing premature log suppression. Make WePkgDispatcher null-safe for getUri to avoid NPEs, and add a comment in MmkvConfigManagerImpl highlighting that MMKV must be initialized before use.
@cwuom cwuom merged commit 0aca320 into cwuom:master Feb 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants