This repository has been archived by the owner on Jun 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Android] Fix Android JNI Crash (#2827)
* [Android] Fix Android JNI Crash `jni_object()` in `ReportException()` could be nullptr if `InitFramework()` is not invoked. ``` JNI DETECTED ERROR IN APPLICATION: obj == null in call to CallVoidMethodV from int com.taobao.weex.bridge.WXBridge.nativeCreateInstanceContext(java.lang.String, java.lang.String, java.lang.String, com.taobao.weex.bridge.WXJSObject[]) ...... (_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)+22) (WeexCore::WXBridge::ReportException(_JNIEnv*, char const*, char const*, char const*)+132) (WeexCore::AndroidSide::ReportException(char const*, char const*, char const*)+34) ...... (WeexCore::CoreSideInPlatform::CreateInstance(char const*, char const*, char const*, int, char const*, char const*, char const*, std::__ndk1::vector<InitFrameworkParams*, std::__ndk1::allocator<InitFrameworkParams*>>&, char const*)+820) at com.taobao.weex.bridge.WXBridge.nativeCreateInstanceContext(Native method) at com.taobao.weex.bridge.WXBridge.createInstanceContext(Taobao:233) at com.taobao.weex.bridge.WXBridgeManager.invokeCreateInstanceContext(Taobao:1981) at com.taobao.weex.bridge.WXBridgeManager.invokeCreateInstance(Taobao:1709) ``` * Fix crash in EagleBridge::WeexCoreHandler::PostTaskToMsgLoop message_loop() in PostTaskToMsgLoop() could be nullptr if InitFramework() is not invoked. * Avoid multiple initialization. * Revert changes of InitSciptThread * Post successCallback in RequestHandler to JSThread. * Revert "Post successCallback in RequestHandler to JSThread." This reverts commit 04bc406 * Delete `;`
- Loading branch information