Merge pull request #14197 from xiaofeng11/v3_xf

Fix CCDownloader-curl will crash in js-test & Fix broken image link in TextureCacheTest.js
This commit is contained in:
pandamicro 2015-10-22 14:45:20 +08:00
commit 175f4c02ad
2 changed files with 9 additions and 8 deletions

View File

@ -779,6 +779,12 @@ namespace cocos2d { namespace network {
// update finished tasks
_impl->getFinishedTasks(tasks);
if (_impl->stoped())
{
_scheduler->pauseTarget(this);
}
for (auto& wrapper : tasks)
{
const DownloadTask& task = *wrapper.first;
@ -844,11 +850,6 @@ namespace cocos2d { namespace network {
onTaskFinish(task, coTask._errCode, coTask._errCodeInternal, coTask._errDescription, coTask._buf);
DLLOG(" DownloaderCURL: finish Task: Id(%d)", coTask.serialId);
}
if (_impl->stoped())
{
_scheduler->pauseTarget(this);
}
}
}} // namespace cocos2d::network

View File

@ -79,7 +79,7 @@ var TextureLoadImgTest = TextureCacheTestBase.extend({
});
this.addChild(this._labelSecond, 1);
var url = "http://cn.cocos2d-x.org/image/logo.png";
var url = "http://www.cocos2d-x.org/images/logo.png";
cc.textureCache.addImageAsync(url, this.texFirstLoaded, this);
cc.textureCache.addImageAsync(url, this.texSecondLoaded, this);
},
@ -264,7 +264,7 @@ var TextureCacheTest = TextureCacheTestBase.extend({
var RemoteTextureTest = TextureCacheTestBase.extend({
_title:"Remote Texture Test",
_subtitle:"",
_remoteTex: "http://cn.cocos2d-x.org/image/logo.png",
_remoteTex: "http://www.cocos2d-x.org/images/logo.png",
onEnter:function () {
this._super();
if('opengl' in cc.sys.capabilities && !cc.sys.isNative){
@ -277,7 +277,7 @@ var RemoteTextureTest = TextureCacheTestBase.extend({
},
startDownload: function() {
var imageUrlArray = ["http://www.cocos2d-x.org/s/upload/v35.jpg", "http://www.cocos2d-x.org/s/upload/testin.jpg", "http://www.cocos2d-x.org/s/upload/geometry_dash.jpg", "http://cn.cocos2d-x.org/image/logo.png"];
var imageUrlArray = ["http://www.cocos2d-x.org/s/upload/v35.jpg", "http://www.cocos2d-x.org/s/upload/testin.jpg", "http://www.cocos2d-x.org/s/upload/geometry_dash.jpg", "http://www.cocos2d-x.org/images/logo.png"];
for (var i = 0; i < imageUrlArray.length; i++) {
cc.textureCache.addImageAsync(imageUrlArray[i], this.texLoaded, this);