You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/07 15:11:00 UTC

[jira] [Commented] (WEEX-94) scroller component can lead to crash in iOS 8 and older iOS version

    [ https://issues.apache.org/jira/browse/WEEX-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16242149#comment-16242149 ] 

ASF GitHub Bot commented on WEEX-94:
------------------------------------

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 <zh...@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 <zh...@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

----


> scroller component can lead to crash in iOS 8 and older iOS version
> -------------------------------------------------------------------
>
>                 Key: WEEX-94
>                 URL: https://issues.apache.org/jira/browse/WEEX-94
>             Project: Weex
>          Issue Type: Bug
>          Components: iOS
>            Reporter: xingZhang
>            Assignee: Adam Feng
>         Attachments: 屏幕快照 2017-11-07 20.47.29.png
>
>
>    As iOS developers knows, assign property object will not be set as nil when its object deallocated, and weak property will do.
>    We found crash only on iOS 8 about scrollview delegate zombie object now, it is necessary to fix it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)