🐛 修复 early-start 事件分发失效#1490
Closed
CodFrm wants to merge 1 commit into
Closed
Conversation
Collaborator
|
所以有方法修?应该没有吧。赌运游戏 Rob Wu大佬们昨天开会了谈main world script 被污染这个问题。但目前未有定案 |
Member
Author
再观察一下,测试一下,准备发布下一个版本 |
cyfung1031
reviewed
Jun 5, 2026
| let o = { cancelable: true, detail: { scriptFlag: '${flag}', scriptInfo: (${scriptInfoJSON}) } }, | ||
| c = typeof cloneInto === "function" ? cloneInto(o, performance) : o, | ||
| f = () => performance.dispatchEvent(new CustomEvent('${evScriptLoad}', c)), | ||
| f = () => dispatchEvent.call(performance, new CustomEvent('${evScriptLoad}', c)), |
Collaborator
There was a problem hiding this comment.
当时我在写这个就意识到有被修改的问题,但我不觉得要处理。它不像window那样会失效。(没有沙盒替换) 假设能被改后也能正常执行吧。
如果你要仔细去想,Function.prototype的call和apply也可以被污染。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
错误的问题修复