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

@PatriceJiang
Copy link
Contributor

@PatriceJiang PatriceJiang commented Apr 19, 2019

No description provided.


_isLoadEnd = true;
if (onloadend != nullptr)
onloadend();
Copy link
Contributor Author

@PatriceJiang PatriceJiang Apr 19, 2019

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

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

Copy link
Contributor

@minggo minggo Apr 19, 2019

onResponse() 一定会被调用吗?

Copy link
Contributor Author

@PatriceJiang PatriceJiang Apr 19, 2019

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

@PatriceJiang
Copy link
Contributor Author

@PatriceJiang PatriceJiang commented Apr 19, 2019

@minggo 麻烦有空review下

minggo
minggo approved these changes Apr 22, 2019
@jareguo
Copy link
Member

@jareguo jareguo commented Apr 22, 2019

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

@jareguo jareguo merged commit 91a7433 into cocos-creator:v2.1-release Apr 22, 2019
1 check passed
@PatriceJiang PatriceJiang deleted the fix_xml_timeout_gc_issue branch Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants