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

Prevent XMLHttpRequest from being gc incorrectly, when timeout occurs. #1724

Merged

Conversation

Projects
None yet
3 participants
@PatriceJiang
Copy link
Contributor

commented Apr 19, 2019

No description provided.

PatriceJiang added some commits Apr 19, 2019


_isLoadEnd = true;
if (onloadend != nullptr)
onloadend();

This comment has been minimized.

Copy link
@PatriceJiang

PatriceJiang Apr 19, 2019

Author Contributor

这里会导致对象被unroot, 有概率在onRespone之前被析构.

onloadend的会调移到onResponse内以修复.

This comment has been minimized.

Copy link
@minggo

minggo Apr 19, 2019

Contributor

onResponse() 一定会被调用吗?

This comment has been minimized.

Copy link
@PatriceJiang

PatriceJiang Apr 19, 2019

Author Contributor

 在超时的情况下 是一定会被调用的

@PatriceJiang

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2019

@minggo 麻烦有空review下

PatriceJiang added some commits Apr 19, 2019

@minggo

minggo approved these changes Apr 22, 2019

@jareguo

This comment has been minimized.

Copy link
Contributor

commented Apr 22, 2019

要发版本,先合并了,如果有需要调整麻烦再提个 PR

@jareguo jareguo merged commit 91a7433 into cocos-creator:v2.1-release Apr 22, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.