LGTM. From: Crosswalk-dev [mailto:crosswalk-dev-boun...@lists.crosswalk-project.org] On Behalf Of tomorrow chen Sent: Tuesday, November 29, 2016 3:15 PM To: crosswalk-dev@lists.crosswalk-project.org Subject: [Crosswalk-dev] Intent to Implement <Support Crosswalk and Android System WebView in the same application>
Description: There's an crash issue when XWalk co-exist with android system webview in one application. The root cause is xwalk_core_library load wrong icudtl.dat which android system webview put in assets folder. The solution is remove the incorrect codes which check and load from assets/icudtl.dat in high priority, since xwalk don't put it's icudtl.dat in assets. Affected component: base/i18n Related feature: XWALK-7004 Target release: crosswalk-22 Implementation details: Comment following code can fix this issue. #if defined(OS_ANDROID) // int fd = base::android::OpenApkAsset(kAndroidAssetsIcuDataFileName, // &g_icudtl_region); // LOG(INFO)<<"cyz "<<kAndroidAssetsIcuDataFileName <<",return fd "<<fd; // g_icudtl_pf = fd; // if (fd != -1) { // return; // } // For unit tests, data file is located on disk, so try there as a fallback. #endif // defined(OS_ANDROID) The reason is : In ResourceExtractor.java,there's comment, _"// Loading "icudtl.dat" from "assets/"" currently does not work with either // embedded mode (the file is in raw/res) or shared mode (the app's context is // used to retrieve the AssetManager, not Crosswalk's). We thus need to put // those special files in a different directory so that we leverage the fallback // code in Chromium to load these files from disk. "_ It means xwalk will put icudtl.dat in different folder like raw/res instead of assets. So it's not right to check and read from assets/icudtl.dat in high priority.Otherwise when android webview is called firstly, app will extract webview.apk and copy it's icudtl.dat to assets, which cause the crash due to mismatch icudtl.dat.
_______________________________________________ Crosswalk-dev mailing list Crosswalk-dev@lists.crosswalk-project.org https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev