Commit Graph

176 Commits

Author SHA1 Message Date
leda 538f4b5df0 correct seLog declare error (#1356) 2018-07-02 20:54:24 +08:00
minggo 5b8919ccdf merge develop branch 2018-06-27 17:27:04 +08:00
James Chen c7801b75f8 Minor fixes while running on macOS with V8 script engine. (#1305) 2018-06-07 16:08:06 +08:00
James Chen 712173a8de Supports DeviceMotionEvent and removes more unused code. (#1275)
* Binds Device class

* Removes ccFPSImage.c/h

* Updates Android.mk

* Supports DeviceMotionEvent and removes more unused code.

* Uses fprintf to implement SE_LOGD & SE_LOGE .
2018-05-31 14:08:20 +08:00
吴智明 1fac8ddf89 add stderr for logE , so that creator can separate logs and errors (#1274)
* add stderr for logE , so that creator can separate logs and errors

* use FILE* as params to print logs and errors for windows
2018-05-31 14:07:26 +08:00
Jare Guo 2663fe890b Merge commit 'da9b357166b8d2c2e5877d7ff74397bfdb5c9a51' into develop 2018-05-29 14:22:12 +08:00
James Chen 287f085c0d Sync 1.9 changes, se::Object::clearPrivateData takes a parameter 'clearMapping' to indicate whether to clearMapping in this function. (#1265)
* Adds TODO in restartVM bindings.

* Sync 1.9 changes, se::Object::clearPrivateData takes a parameter 'clearMapping' to indicate whether to clearMapping in this function.

* Removes unused function recreate_seval_by_native_ptr.
2018-05-24 16:50:21 +08:00
James Chen da9b357166 Fix potential issues in the mode of cpp controls js object's lifecycle. (#1264)
* Fix potential issues in the mode of cpp controls js object's lifecycle.

* Updates comments when using clearPrivateData(false);
2018-05-24 16:32:27 +08:00
James Chen 442c149053 Implements Application::restart and some fixes. (#1253)
* Implements Application::restart.

* SAFE_DEC_REF should reset pointer to nullptr.

* Class::cleanup should be after of JSGlobalContextRelease.

* WebGLObject needs to be released if ScriptEngine is in cleanup process.

* Fixes memory leak in JSB_glGetActiveAttrib
2018-05-21 18:46:12 +08:00
James Chen 2e174ff1c2 Supports dispatching custom event for EventDispatcher. (#1240)
* Adds __jsbInvocationCount for SpiderMonkey.

* Supports dispatching custom event for EventDispatcher.
2018-05-14 17:19:03 +08:00
James Chen 727a4911d4 [runtime] Adds jsb.openURL, __getOSVersion, __getCurrentLanguage interfaces. (#1238) 2018-05-11 16:03:17 +08:00
James Chen 6df1923235 [jswrapper] Object::defineFunction fix for SpiderMonkey port, the function must be able to be enumrated and permanent. (#1232) 2018-05-08 18:14:35 +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
minggo 0505ee928a Optimize (#1199)
* optimize performace

* optimize performance
2018-04-18 17:47:46 +08:00
minggo 3113af6176 optimize performance (#1191) 2018-04-12 11:44:11 +08:00
James Chen 4ee7981630 Merge branch 'new-renderer' of git://github.com/cocos-creator/cocos2d-x-lite into runtime
# Conflicts:
#	cocos/platform/mac/CCCanvasRenderingContext2D-mac.mm
#	cocos/scripting/js-bindings/manual/jsb_gfx_manual.cpp
2018-03-23 15:42:12 +08:00
minggo 0be49352d0 H5 adapt merge (#1164)
* h5 adpator

* adapt to h5 engine
2018-03-23 15:26:09 +08:00
James Chen fd0f172b41 Supports faster TypedArray operation for iOS lower than 10. Uses some code in Ejecta. (#1163) 2018-03-23 14:59:18 +08:00
Jare Guo ea4bfd1fcd Merge pull request #1159 from cocos-creator/v1.9
sync branch
2018-03-22 11:45:51 +08:00
James Chen 7951d52df7 [ios] se::Object::isTypedArray fix for iOS 8~9. 2018-03-12 21:48:38 +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 38cdd2b17d Adds const. 2018-03-05 18:11:08 +08:00
James Chen e83be4b12f fix missing getFileOperationDelegate for v8. 2018-03-05 17:42:50 +08:00
James Chen 3f88e14de9 require supports module.exports. 2018-02-27 17:03:28 +08:00
James Chen 5453cbc99f Updates jswrapper to the latest version. (#1127) 2018-02-24 11:48:08 +08:00
James Chen 4da873ecb8 Merge branch 'v1.8' into develop
# Conflicts:
#	cocos/scripting/js-bindings/script/jsb_cocos2d.js
2018-02-23 10:26:48 +08:00
James Chen 89509a9e53 [iOS] Potential crash fix in SE_BIND_CTOR macro. (#1116) 2018-02-12 17:03:03 +08:00
James Chen a195bffcad Ignore infinite loop in Exception handling. (#1110) 2018-02-11 13:54:37 +08:00
Jare Guo d9bd3d763c update license (#1089)
* updating license

* update license
2018-02-01 15:20:01 +08:00
James Chen 50e386792c Make dragonbones::CCFactory constructor public. (#1083)
* Make dragonbones::CCFactory constructor public.

* Adds auto_api.js
2018-01-29 10:50:39 +08:00
James Chen 918a7cc4d9 Fix redundant zero while se::Value::toStringForce for a float number. (#1081) 2018-01-23 09:32:41 +08:00
James Chen 6693c26403 [iOS] Fixes createTypedArray return null on <= iOS 9 (#1066) 2018-01-10 18:42:13 +08:00
James Chen 2e3883f097 [Android] Fixed compilation error while using APP_PLATFORM >= 22. (#1012)
* [Android] Fixed compilation error while using APP_PLATFORM >= 22.

* Don't use deprecated createUint8TypedArray.
2017-11-23 15:19:37 +08:00
James Chen 5050fb570b Any kinds of se::Value should be able to be converted to std::string. 2017-11-17 13:52:43 +08:00
James Chen 4ccf1df75a Adds se::Object::toString() method for converting an Object to std::string. (#992) 2017-11-17 13:40:25 +08:00
James Chen de091e7369 se::Object::getTypedArrayData fix for jsc and v8. Need to consider byteOffset of ArrayBuffer stored in TypedArray. (#989) 2017-11-16 10:39:33 +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 0fccb356ae Merge pull request #984 from cocos-creator/v1.7-release
Merge v1.7-release
2017-11-14 15:13:24 +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
Jare Guo 2a8702af7c Merge pull request #981 from cocos-creator/v1.7-release
Update V1.7
2017-11-13 02:50:04 -06:00
James Chen d2462a8c7f Fixes apple reject apps reference JSSynchronousGarbageCollectForDebugging (#980) 2017-11-12 09:18:07 +08:00
James Chen a55cb9b0d3 Adds New API se::Object::createTypedArray and deprecates se::Object::createUint8TypedArray. (#974)
* Adds New API se::Object::createTypedArray and deprecates se::Object::createUint8TypedArray.

* Fixes mistake while cherry-pick.
2017-11-09 17:06:13 +08:00
James Chen 2c6a18ec0e Adds missing LOGD -> SE_LOGD 2017-11-02 12:50:24 +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 e3dfe089ca Adds missing \n 2017-11-02 11:20:41 +08:00
James Chen 2e9c14e87a cleanup fix for v8 2017-11-02 11:13:02 +08:00
James Chen 7d0979da3c Unify jsc parsing flow for SpiderMonkey. 2017-11-02 11:12:39 +08:00
James Chen a3c8ba6632 Prints ERROR log if native binding function return false. 2017-11-02 10:32:31 +08:00