Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

事件分发层绑定时存储的handler与解绑时错位 #42

Closed
huzunjie opened this issue Nov 24, 2017 · 0 comments
Closed

事件分发层绑定时存储的handler与解绑时错位 #42

huzunjie opened this issue Nov 24, 2017 · 0 comments
Assignees

Comments

@huzunjie
Copy link
Member

huzunjie commented Nov 24, 2017

相关变量:videoEventHandlerList videoDomEventHandlerList,只有push没有pull,但解绑时索引每次都是从0开始。

所以多切几次流让 videoElement销毁创建多次 ,HandlerList就会一直push,导致最后销毁播放器实例时候解绑失败,会报告事件异常。

相关代码:

https://github.com/Chimeejs/chimee/blob/master/src/dispatcher/dom.js#L143

https://github.com/Chimeejs/chimee/blob/master/src/dispatcher/dom.js#L148

https://github.com/Chimeejs/chimee/blob/master/src/dispatcher/dom.js#L158

https://github.com/Chimeejs/chimee/blob/master/src/dispatcher/dom.js#L161

toxic-johann added a commit that referenced this issue Nov 24, 2017
what: clear the domHandlerList when we unbind the function
why: when destroy video, we forget to remove the function binding in the list, so the next time we remove video, it will throw error.
@toxic-johann toxic-johann added fixed and removed doing labels Nov 24, 2017
toxic-johann added a commit that referenced this issue Nov 24, 2017
fix kernel property update bug on [#40](#40)
fix event unbind bug on [#42](#40)
toxic-johann added a commit that referenced this issue May 31, 2019
…ndlerList when we unbind the function why: when destroy video, we forget to remove the function binding in the list, so the next time we remove video, it will throw error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants