Merge pull request #2868 from folecr/develop

fixed #2281: When user has built with JS Debugger support ScriptingCore will handle necessary runtime changes
This commit is contained in:
James Chen 2013-06-12 23:52:53 -07:00
commit 1f2f366ef6
3 changed files with 3 additions and 4 deletions

View File

@ -42,7 +42,6 @@ bool AppDelegate::applicationDidFinishLaunching()
CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance();
CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine);
#if JSB_ENABLE_DEBUGGER
ScriptingCore::getInstance()->enableDebugger();
ScriptingCore::getInstance()->runScript("main.debug.js");
#else
ScriptingCore::getInstance()->runScript("MoonWarriors-jsb.js");

View File

@ -56,9 +56,6 @@ bool AppDelegate::applicationDidFinishLaunching()
#ifdef JS_OBFUSCATED
ScriptingCore::getInstance()->runScript("game.js");
#else
#if JSB_ENABLE_DEBUGGER
ScriptingCore::getInstance()->enableDebugger();
#endif // JSB_ENABLE_DEBUGGER
ScriptingCore::getInstance()->runScript("tests-boot-jsb.js");
#endif
return true;

View File

@ -380,6 +380,9 @@ JSBool ScriptingCore::evalString(const char *string, jsval *outVal, const char *
void ScriptingCore::start() {
// for now just this
this->createGlobalContext();
#if JSB_ENABLE_DEBUGGER
this->enableDebugger();
#endif //JSB_ENABLE_DEBUGGER
}
void ScriptingCore::addRegisterCallback(sc_register_sth callback) {