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);
}