Tencent / VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Other
11.81k stars 1.61k forks source link

iOS系统 sonic-link请求代理回之前释放Session,必崩溃 #253

Closed lszw closed 6 years ago

lszw commented 6 years ago

1.若 responseHeader里含sonic-link,点击rootVC中“DO SONIC PRELOAD”按钮,做预加载,必崩溃。 2.偶现:responseHeader里含sonic-link,正常sonic请求到SonicWebViewController,在sonic-link请求完成回调完之前,popVC,此时session释放,sonic-link处理请求结果代理释放,依旧会崩溃。

由于此预加载没有sessionDelegate,主url请求完之后释放session,连带释放了resourceLoader,进而释放resourceLoadOperation,所以,sonic-link中的url请求回调找不到代理方法而崩溃。

此崩溃在iOS系统任何版本都复现。

sonic-ios-dev commented 6 years ago

收到,我这边调试下看

sonic-ios-dev commented 6 years ago

我已经提交了修复的pull request;https://github.com/Tencent/VasSonic/pull/256