Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[Android] Fix Android Crash in PostTaskToMsgLoop #2830

Merged
merged 3 commits into from
Aug 15, 2019

Conversation

YorkShen
Copy link
Contributor

[Android] Fix Android Crash in PostTaskToMsgLoop

As WeexCoreManager::Instance()->script_thread() is initialized in WeexCore::InitFramework, EagleBridge::WeexCoreHandler::PostTaskToMsgLoop will crash if WeexCore::InitFramework is not invoked.

Fix this problem by not supporting EagleBridge::WeexCoreHandler::PostTaskToMsgLoop anymore.

Stackstrace:

libweexcore.so (_ZN8WeexCore11EagleBridge15WeexCoreHandler17PostTaskToMsgLoopERKNSt6__ndk18functionIFvvEEE+13)

Brief Description of the PR

Checklist

  • Demo:
  • Documentation:

…kToMsgLoop`

As `WeexCoreManager::Instance()->script_thread()` is initialized in `WeexCore::InitFramework`, `EagleBridge::WeexCoreHandler::PostTaskToMsgLoop` will crash if `WeexCore::InitFramework` is not invoked.

Fix this problem by not supporting `EagleBridge::WeexCoreHandler::PostTaskToMsgLoop` anymore.

```
libweexcore.so (_ZN8WeexCore11EagleBridge15WeexCoreHandler17PostTaskToMsgLoopERKNSt6__ndk18functionIFvvEEE+13)
```
@YorkShen YorkShen added this to the Weex 0.27 milestone Aug 15, 2019
@weex-bot
Copy link

weex-bot commented Aug 15, 2019

Warnings
⚠️ Potential BREAK CHANGE. Modify public in android/sdk/src/main/java/com/taobao/weex/bridge/RequestHandler.java without metion it in commit message. You'd better add '@notdanger' in your commit log.
⚠️ No Changelog changes! - Can you add a Changelog? To do so,append your changes to the changelog.md
⚠️ If your PR is about fixing a bug excluding crash the code,you should add the demo link in the PR description. Demo link: http://dotwe.org/vue
⚠️ If you update the code, maybe you should update the documentation and add the documentation link in the PR description. here is the guide about how to contribute documentation: https://github.com/apache/incubator-weex/blob/master/CONTRIBUTING.md#contribute-code-or-document
Messages
📖 danger test finished.

Generated by 🚫 dangerJS against 47cdadb

WXBridgeManager.getInstance().post(new Runnable() {
@Override
public void run() {
nativeInvokeOnSuccess(sNativeCallback, script, bundleTypeStr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里需要判断一下 jsframework 是否初始化 ok 了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@Darin726 Darin726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Darin726 Darin726 merged commit 16e476e into apache:master Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants