Skip to content

修复浏览器restart未成功#231

Merged
1226085293 merged 1 commit intomainfrom
修复浏览器restart未成功
Mar 4, 2026

Hidden character warning

The head ref may contain hidden characters: "\u4fee\u590d\u6d4f\u89c8\u5668restart\u672a\u6210\u529f"
Merged

修复浏览器restart未成功#231
1226085293 merged 1 commit intomainfrom
修复浏览器restart未成功

Conversation

@1226085293
Copy link
Owner

No description provided.

@1226085293 1226085293 added this to the v1.1.6 milestone Mar 4, 2026
@1226085293 1226085293 self-assigned this Mar 4, 2026
@1226085293 1226085293 added the bug 有东西不工作 | Something isn't working label Mar 4, 2026
@1226085293 1226085293 merged commit 1026e10 into main Mar 4, 2026
1 check passed
@1226085293 1226085293 deleted the 修复浏览器restart未成功 branch March 4, 2026 09:39
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a6727d18a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 61 to +62
game.restart();
globalEvent.emit(globalEvent.key.restartFinish);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Await restart before emitting completion event

game.restart() is asynchronous (Promise<void> in tool/typedoc/declare/cc.d.ts), but restartFinish is emitted immediately afterward, so listeners can run before restart has actually completed. In the browser path, MKBundle uses this event to call initFunc(director.getScene()!); firing early can reinitialize against stale runtime state (or a not-yet-ready scene), which breaks the intended “restart finished” contract.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 有东西不工作 | Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant