Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[WEEX-96][iOS] bug-fix about timer exposed on JSContext #839

Merged

Conversation

acton393
Copy link
Member

@acton393 acton393 commented Nov 7, 2017

In most case , element in cell will be re-use for memory especially in very
long list, but if add event for this element, here will generate a new view for
this element,if it's nil due to a getter method whether it is off-screen.

For instance, image element in cell will re-use if it is disappear in vision area,
loaded again while it back to visual area. In this case , when it disappear, just
add event such as click, touch and so on , it will then create a new view,
and load image again, although it is off-screen.

If the view is not loaded, so won't add gesture or call this view getter to create
any view until the view is loaded, then it will init events according to record in
component.

Bug: 98

  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
@weex-bot
Copy link

weex-bot commented Nov 7, 2017

Messages
📖 has no android file changed.
📖 android test finished.

Generated by 🚫 dangerJS

@asfgit asfgit merged commit 45c6c7e into apache:master Nov 9, 2017
@acton393 acton393 deleted the ios-bugfix-timer-exposed-in-JSContext branch December 5, 2017 09:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants