Fixed WebSocket JSB crash issue

This commit is contained in:
pandamicro 2015-12-23 23:28:14 +08:00
parent a91a669972
commit acf03c06d5
2 changed files with 2 additions and 2 deletions

View File

@ -140,8 +140,8 @@ public:
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(_JSDelegate.ref()), "onclose", 1, &args);
auto copy = &p->obj;
jsb_remove_proxy(p);
JS::RemoveObjectRoot(cx, copy);
jsb_remove_proxy(p);
CC_SAFE_DELETE(ws);
}

View File

@ -366,7 +366,7 @@ var MouseTest = EventTest.extend({
if( 'mouse' in cc.sys.capabilities ) {
cc.eventManager.addListener({
event: cc.EventListener.MOUSE,
event: cc.EventListener.MOUSE,
onMouseDown: function(event){
var pos = event.getLocation(), target = event.getCurrentTarget();
if(event.getButton() === cc.EventMouse.BUTTON_RIGHT)