Commit Graph

8 Commits

Author SHA1 Message Date
James Chen 68be4dbbaf Fix potential crash after WebSocket.close.
Since the finalize function will get a invalid pointer of WebSocket, invoking ws->closeAysnc() will generate unknown result, probably crash.
HOW TO FIX:
WebSocket and JSB_WebSocketDelegate inhert from Ref. After websocket is initialized successfully, retain websocket instance and delegate, they will both have 2 reference count.
release their reference both in onClose callback and finalize function. The reason is that the order of invoking onClose and finalize function will be unpredictable, ref count technique help to handle this.

Another fix is sending onclose event after onerror is received.
2017-07-20 16:43:24 +08:00
James Chen fc98b4bdc0 Sync with cocos2d-x v3 branch ddb4dc8 commit. 2017-04-24 10:49:02 +08:00
pandamicro bcbc4e1131 Upgrade cocos/math & cocos/network to v3.13 2016-08-05 18:13:16 +08:00
Wenhai Lin d4481bfd5a Refine (#48) 2016-04-28 11:58:34 +08:00
Wenhai Lin 83fc6fd1a8 Bug fix:
1.Fixed crash in win for rich text
2.Fixed crash when custom SSL certificate is set on iOS
3.Fixed SocketIO crash on reconnect
4.Fixed ActionManager memory leak
5.Fixed crash in MenuItem::activate
6.Fixed crash on exit game
7.Fixed crash in TableView::updateCellAtIndex
8.Fixed crash in RichText on window
2016-04-21 15:19:47 +08:00
Wenhai Lin ec1a1d65b7 Remove unnecessary 'void' modifier 2016-04-07 23:13:19 +08:00
Wenhai Lin 94c95d5838 Withespaces does matter. 2016-03-31 23:50:02 +08:00
Wenhai Lin a6dbf31dcf cocos 2d lite version 2016-03-29 17:55:48 +08:00