mirror of https://github.com/axmolengine/axmol.git
Merge pull request #5225 from dumganhar/iss3853-jsb-crash-debug-mode
closed #3853: Some JSB projects(TestJavascript, WatermelonWithMe) crash in DEBUG mode on iOS platform.
This commit is contained in:
commit
b7d5d430a4
|
@ -1 +1 @@
|
|||
cf66879460037639be60615c3aeeb56e799daaeb
|
||||
3c7f70ab861d6d3348d4f598cf492b29b306d9d9
|
|
@ -1 +1 @@
|
|||
7a606b7819e4f2a8d7eb689a029974d84d57cf63
|
||||
cb6829f533bf328c6df6cd510b92ae2a63725380
|
|
@ -75,7 +75,7 @@ bool Configuration::init()
|
|||
_valueDict["cocos2d.x.compiled_with_gl_state_cache"] = Value(true);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#if COCOS2D_DEBUG
|
||||
_valueDict["cocos2d.x.build_type"] = Value("DEBUG");
|
||||
#else
|
||||
_valueDict["cocos2d.x.build_type"] = Value("RELEASE");
|
||||
|
|
|
@ -351,7 +351,7 @@ void Director::calculateDeltaTime()
|
|||
_deltaTime = MAX(0, _deltaTime);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#if COCOS2D_DEBUG
|
||||
// If we are debugging our code, prevent big delta time
|
||||
if (_deltaTime > 0.2f)
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
#include "js_bindings_config.h"
|
||||
|
||||
#if DEBUG
|
||||
#if COCOS2D_DEBUG
|
||||
#define TRACE_DEBUGGER_SERVER(...) CCLOG(__VA_ARGS__)
|
||||
#else
|
||||
#define TRACE_DEBUGGER_SERVER(...)
|
||||
|
@ -568,7 +568,7 @@ JSBool ScriptingCore::runScript(const char *path, JSObject* global, JSContext* c
|
|||
if (script) {
|
||||
jsval rval;
|
||||
filename_script[path] = script;
|
||||
JSAutoCompartment ac(cx, global);
|
||||
|
||||
evaluatedOK = JS_ExecuteScript(cx, global, script, &rval);
|
||||
if (JS_FALSE == evaluatedOK) {
|
||||
cocos2d::log("(evaluatedOK == JS_FALSE)");
|
||||
|
@ -704,7 +704,7 @@ JSBool ScriptingCore::dumpRoot(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
{
|
||||
// JS_DumpNamedRoots is only available on DEBUG versions of SpiderMonkey.
|
||||
// Mac and Simulator versions were compiled with DEBUG.
|
||||
#if DEBUG
|
||||
#if COCOS2D_DEBUG
|
||||
// JSContext *_cx = ScriptingCore::getInstance()->getGlobalContext();
|
||||
// JSRuntime *rt = JS_GetRuntime(_cx);
|
||||
// JS_DumpNamedRoots(rt, dumpNamedRoot, NULL);
|
||||
|
|
Loading…
Reference in New Issue