Commit Graph

36 Commits

Author SHA1 Message Date
James Chen c195c82c2f Improves native window.console support. Message could be shown both in Browser while debugging and Creator's console.
The line number of console.log(debug,info,warn,error) output in browser is precise.
2017-10-17 15:41:00 +08:00
James Chen 039f531bbf Prints JS engine version. 2017-10-10 14:26:12 +08:00
James Chen c625158e74 Moves cocos2d-x node:onEnter/onExit binding code from se::ScriptEngine to ScriptingCore. 2017-10-09 15:25:10 +08:00
James Chen 9bbc052444 se::ScriptEngine::enableDebugger takes serverAddr and port arguments. 2017-10-09 15:00:04 +08:00
James Chen 7c0b328dd3 typo fix in sm/ScriptEngine.cpp 2017-09-29 10:30:40 +08:00
2youyouo2 5cfc3ec097 change onGetDataFromFile param to callback function 2017-09-28 17:06:55 +08:00
James Chen 8230176ccb Fixes crash while click restart button in network test. (#829)
* Sync PR(https://github.com/cocos2d/cocos2d-x/pull/17921): remove "system" usage which is removed from iOS11.

* Fixes crash while click `restart` button in network test.

* printf -> LOGD

* Memory leak fix in XMLHttpRequest binding code.
2017-09-20 01:48:15 -05:00
James Chen 9dafab9c49 macOS and iOS use JavaScriptCore, windows and android use V8. 2017-09-18 16:11:50 +08:00
James Chen 5eba72627a [jsb2.0] SpiderMonkey debugger works. Adds ScriptEngine::enableDebugger, mainLoopUpdate interfaces. 2017-09-07 18:19:38 +08:00
James Chen 4df2b69d2f For compatibility purpose, __errorHandler has 4 parameters, they are filePath, lineno, message, stack. 2017-09-06 16:08:16 +08:00
James Chen ad13e5336b Adds global variable scriptEngineType. 2017-09-06 11:11:37 +08:00
James Chen 05a3f74842 [SM] Exception info contains location, message, stack. Location contains filePath, line number and column number. 2017-09-06 10:58:43 +08:00
James Chen 2b112bd7a4 Adds ScriptEngine::setExceptionCallback for Spidermonkey, and fixes a memory leak after using JS_EncodeStringToUTF8. 2017-09-01 15:24:43 +08:00
James Chen 6c40f2783f More renames: gc -> garbageCollect, isInGC -> isGarbageCollecting, _setInGC -> _setGarbageCollecting 2017-08-31 15:52:58 +08:00
James Chen f2923331af Less friend class declaration in ScriptEngine, adds ScriptEngine::isInCleanup method for checking whether script engine is cleaning up. 2017-08-31 15:00:23 +08:00
James Chen f21fea4344 executeScriptBuffer -> evalString, executeScriptFile -> runScript. 2017-08-31 15:00:23 +08:00
James Chen 53250dad49 se::Ref -> se::RefCounter, addRef -> incRef, release -> decRef
This is for distinguishing from cocos2d::Ref.
2017-08-31 14:24:34 +08:00
James Chen df01303041 attachChild -> attachObject, detachChild -> detachObject, isSame -> strictEquals 2017-08-31 10:33:17 +08:00
James Chen 7268053a4f SpiderMonkey bytecode works again. 2017-08-21 18:10:10 +08:00
James Chen 41eae72bd8 Adds global variable 'window' for jsc and cleanup. 2017-08-18 16:03:04 +08:00
James Chen 2fab54c612 fix ios crash after closing app in task manager. 2017-08-18 14:34:55 +08:00
James Chen 73e45e92e4 Adds MappingUtils file, box2d works again. 2017-08-18 14:34:55 +08:00
James Chen 6b28dddb92 cleanup. 2017-08-08 16:01:37 +08:00
James Chen cc1b2b1dc5 More API comments. 2017-08-03 17:27:06 +08:00
James Chen 28469cc9f7 update spidermonkey. 2017-08-02 16:44:16 +08:00
James Chen 9862b765c8 cleanup 2017-07-28 17:35:55 +08:00
James Chen 91d5444e20 Spidermonkey promise works. 2017-07-25 15:34:14 +08:00
James Chen 99529069c4 cleanup and restartVM works. 2017-07-21 14:56:48 +08:00
James Chen e5edd5d6cf cleanup. 2017-07-20 17:50:40 +08:00
James Chen b3db0a842a add modules register 2017-07-12 11:15:46 +08:00
James Chen af6aa8f45e ios jsc, sm works. 2017-06-26 10:41:26 +08:00
James Chen fec4da9bb0 sm works. 2017-06-26 09:57:55 +08:00
James Chen 05a893a08b printf -> LOGD 2017-06-23 13:44:18 +08:00
James Chen d1a2e05ced temp 2017-06-20 10:25:37 +08:00
James Chen 259bbbd6b2 updates. 2017-06-16 16:32:24 +08:00
James Chen 91359f1f75 first commit 2017-06-15 17:24:30 +08:00