mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fixed #16831: Error information is printed forever if there is an error is triggered in timer callback (#16833)
This commit is contained in:
@@ -46,7 +46,7 @@ if (DEV) {
|
||||
legacyCC._Test = {};
|
||||
}
|
||||
|
||||
const engineVersion = '3.8.3';
|
||||
const engineVersion = '3.8.4';
|
||||
|
||||
/**
|
||||
* @en
|
||||
|
||||
@@ -25,9 +25,9 @@ THE SOFTWARE.
|
||||
|
||||
#define COCOS_MAJOR_VERSION 3
|
||||
#define COCOS_MINJOR_VERSION 8
|
||||
#define COCOS_PATCH_VERSION 3
|
||||
#define COCOS_VERSION_STRING "3.8.3"
|
||||
#define COCOS_PATCH_VERSION 4
|
||||
#define COCOS_VERSION_STRING "3.8.4"
|
||||
#define COCOS_VERSION_DEFINED 1
|
||||
#define COCOS_VERSION 30803
|
||||
#define COCOS_VERSION 30804
|
||||
|
||||
// #define COCOS_PRE_RELEASE "release"
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cocos-creator",
|
||||
"version": "3.8.3",
|
||||
"version": "3.8.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cocos-creator",
|
||||
"version": "3.8.3",
|
||||
"version": "3.8.4",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cocos-creator",
|
||||
"version": "3.8.3",
|
||||
"version": "3.8.4",
|
||||
"description": "Cocos Creator is a cross-platform 2D & 3D game engine written in C++ and TypeScript, licensed under MIT.",
|
||||
"homepage": "http://www.cocos.com",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -82,16 +82,20 @@ function fireTimeout (nowMilliSeconds) {
|
||||
if (info && info.cb) {
|
||||
if ((nowMilliSeconds - info.start) >= info.delay) {
|
||||
// console.log(`fireTimeout: id ${id}, start: ${info.start}, delay: ${info.delay}, now: ${nowMilliSeconds}`);
|
||||
if (info.isRepeat) {
|
||||
info.start = nowMilliSeconds;
|
||||
} else {
|
||||
// The delete operation should be performed before the timeout callback.
|
||||
// This is because if an error occurs during the timeout callback,
|
||||
// it could be triggered indefinitely, leading to a game freeze.
|
||||
delete _timeoutInfos[id];
|
||||
}
|
||||
|
||||
if (typeof info.cb === 'string') {
|
||||
Function(info.cb)();
|
||||
} else if (typeof info.cb === 'function') {
|
||||
info.cb.apply(info.target, info.args);
|
||||
}
|
||||
if (info.isRepeat) {
|
||||
info.start = nowMilliSeconds;
|
||||
} else {
|
||||
delete _timeoutInfos[id];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user