GitHub user acton393 opened a pull request: https://github.com/apache/incubator-weex/pull/836
[WEEX-94][iOS] fix iOS 8 scrollview assign delegate crash [WEEX-94][iOS] fix iOS 8 scrollview assign delegate crash [WEEX-96][iOS] bug-fix about timer exposed on JSContext You can merge this pull request into a Git repository by running: $ git pull https://github.com/acton393/incubator-weex ios-feature-0.16-bugfix-master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-weex/pull/836.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #836 ---- commit 773cf1f8efa4354825812f6fae6d3a68e7ad1945 Author: acton393 <zhangxing610...@gmail.com> Date: 2017-11-07T14:18:24Z [WEEX-94][iOS] fix iOS 8 scrollview assign delegate crash As iOS developers all knowns, assign property will not be set nil when its object deallocated, and weak object will does, so we must set it to the nil value, in case of crash about messaging to zombie object. In iOS 8 and the older iOS, the property of delegate of UIScrollView is assign, so we must set it to nil manually when object deallocated. And in iOS 9 and later iOS, apple change the delegate property of UIScrollView it to weak, so we don't set it to nil value any more. For compatibility on iOS 8, here we must set it to nil value. Bug: 94 commit dcb6975b7c9cb037660535f11c17eb62154e178d Author: acton393 <zhangxing610...@gmail.com> Date: 2017-11-07T15:07:30Z [WEEX-96][iOS] bug-fix about timer exposed on JSContext Timer exposed on the JSContext, so user can access the function, though JavaScript, it has setTimeout and setInterval functions, those function switch to global queue while execute javaScript code, it may have potential crash about thread safe problem, and for setInterval function, the timeId can not auto-increment, so it is hard to clear it at the end of program. Overview the code, the difference between timer module and the JSConext timer is the execution path is more shorter, the JSContext timer can execute javascript function immediately, but the timer module instruction must be dispatched by weex sdk just like the common modules, the JSContext can be used in canvas scene. Bug: 96 ---- ---