Commit Graph

66 Commits

Author SHA1 Message Date
江战 4c2b647bba remove CCPlatformConfig.h / 3d-gfx (#2555) 2020-06-12 11:17:37 +08:00
江战 d36dea8e5e fix sourcemap (#2541) 2020-06-11 13:47:24 +08:00
江战 7d5dcf4281 catch exception when ScriptEngine::evalString / 3dgfx (#2468)
* - catch exception when evalString
- fix CMake resource path / win32

* remove unused variables
2020-05-20 14:08:45 +08:00
江战 1ab5d5ab80 3dgfx use v8 exposed GC function (#2463)
* use gc

* expose c

* reset _gcFunc
2020-05-19 14:00:18 +08:00
江战 c2439db94e add v8 bytecode support (#2434)
* add bytecode

* update order & add comments

* Update cocos/scripting/js-bindings/jswrapper/v8/ScriptEngine.cpp
2020-05-14 15:08:26 +08:00
江战 880422ad28 [bugfix] crash during global object destructuring / 3d-gfx (#2411)
* fix crash

* fix order
2020-04-28 12:03:51 +08:00
江战 7c140824f0 [bugfix] win32/macosx add sourcemap / 3d-gfx (#2403)
* add sourcemap

* fix platform macro
2020-04-26 09:59:15 +08:00
Arnold ce1cd53386 [gfx] win32 adaptation (#2270)
* update for windows

* update ref location

* update external

* revert debug info

* fix include order

* fix template

* fix buffer

* remove CCStdC-win32*
2020-03-18 11:35:40 +08:00
minggo 1bb0c717d0 fix macro redefine warning of platform defination (#2099) 2020-01-20 15:12:49 +08:00
minggo 522a62a395 fix crash if invoked from non c++ context (#1878)
* fix crash if invoked from non c++ context
For example, this function is invoked in handle block of UIAlert will cause crash.

* fix typo
2019-10-14 18:22:29 +08:00
minggo 751e6f5f23 make v8 work on iOS 2019-07-12 10:36:05 +08:00
minggo fc4e8af9a5 ios use v8 2019-07-12 10:35:56 +08:00
leda 6af2435e20 improve error log when require failed by JSB (#1648)
* add error log when ScriptEngine::evalString failed

* improve require file not existed notify
2018-12-28 16:13:33 +08:00
leda beb45454ad support parse waitForConnect and debugPort from simulator/config.json (#1521)
* revert v8 debugger ip to 0.0.0.0 for simulator

* parse isWaitForConnect and debug port from config.json

* remove macro useless, since we parse the options from config.json
2018-09-26 18:57:56 -07:00
leda a5391aaabd add macro to support custom v8 debug option for creator (#1518)
* add macro to support custom v8 debug option for creator

* update console with version compare fixed

* revert debugger ip to 0.0.0.0 for template
2018-09-25 21:49:55 -07:00
wdzhangchukong bf27fdd955 Rename cc in JSB (#1476)
* Rename __ccgl to __gl

* Rename __CCPrivateData to __PrivateData

* Change CanvasRenderingContext2D to global

* Change CanvasRenderingContext2D to global

* Change getDeviceMotionValue into Device

* Change FileUtils to global

* Change AudioEngine to global

* Change AudioEngine into Audio

* Remove cc in c++

* Remove __jsc__

* Change auto file template

* Name jsb_cocos2d_global to auto

* Reset jsb_cocos2dx_auto

* Register jsb_cocos2dx_global_auto
2018-08-24 17:03:50 +08:00
leda 19ab61b252 refine TODO & FIXME flag (#1450)
* change TODO to REFINE

* change REFINE:cjh to REFINE

* change FIXME to IDEA

* improve format
2018-08-10 12:52:00 +08:00
leda 3ea4405d44 add getCurrentStackTrace interface for v8 script engine (#1446)
* add getCurrentStackTrace interface for v8 script engine

* return empty string before script init finished, prevent crash
2018-08-08 18:09:36 +08:00
minggo 12676d6f2b put debug related files into debugger folder 2018-04-28 14:37:09 +08:00
James Chen ae5c569345 Adds jsb.openDebugView interface, supports to display JSB invocation count. (#1214)
* Adds jsb.openDebugView interface, supports to display JSB invocation count.

* Removes unused log in JniImp.cpp.

* Removes unused log in Cocos2dxRenderer.java
2018-04-26 15:59:20 +08:00
James Chen faa3401f93 Adds window variable for all js vm. Adds se::ScriptEngine::getFileOperationDelegate interface. 2018-03-06 10:39:50 +08:00
James Chen e83be4b12f fix missing getFileOperationDelegate for v8. 2018-03-05 17:42:50 +08:00
Jare Guo d9bd3d763c update license (#1089)
* updating license

* update license
2018-02-01 15:20:01 +08:00
James Chen 2acd8b555a Adds assertion while uses a wrong debug address or port in DEBUG mode. (#986) 2017-11-15 14:23:28 +08:00
James Chen 66bc0e63a3 Uses toStringForce for location name since it's probably be undefined in v8. (#983)
And other minor fixes for sm and chakracore.
2017-11-14 14:58:44 +08:00
James Chen 036a0a21da Moves retain/release code from se::ScriptEngine to ScriptingCore. 2017-11-02 11:44:48 +08:00
James Chen 6a9500df10 LOGD -> SE_LOGD, LOGE -> SE_LOGE to avoid conflict with user code. 2017-11-02 11:35:53 +08:00
James Chen 2e9c14e87a cleanup fix for v8 2017-11-02 11:13:02 +08:00
James Chen df2c482314 Adds license info for .h/.cpp files in jswrapper. 2017-10-24 15:56:37 +08:00
James Chen 1173b2931b Pass wrong message in console.log to browser's console. 2017-10-24 10:05:24 +08:00
James Chen f63aa25170 Fixes console.assert 2017-10-17 15:44:49 +08:00
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 7cc33615c3 Fix source url is too long. 2017-10-10 16:15:16 +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 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 4990aa3130 [V8, ChakraCore] Exception callback info contains location, message, stack. Location contains filePath, line number and column number. 2017-09-06 10:58:43 +08:00
James Chen 510b27fab8 Adds setExceptionCallback for V8. 2017-09-01 16:10:55 +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 17a98a41f1 more log in ScriptEngine. 2017-08-29 17:37:32 +08:00
James Chen 2f38e872c1 Action binding bug fix. 2017-08-22 16:50:41 +08:00