Skip to content

Commit 007d9b2

Browse files
robinmiaukjarosh
authored andcommitted
Update comments for startBackgroundTick method
Clarify comments regarding intervalMs and code injection risk.
1 parent 87c4ce0 commit 007d9b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • web/packages/core/src/internal/player

web/packages/core/src/internal/player/inner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ export class InnerPlayer {
511511
private startBackgroundTick(): void {
512512
const intervalMs = 1000 / (this.metadata?.frameRate || 24);
513513

514-
// intervalMs is a number computed from SWF metadata, so there is no
515-
// risk of code injection via the template literal below.
514+
// intervalMs is always a number (dividing 1000 by anything yields a number
515+
// or NaN), so no code injection via the template literal is possible.
516516
const workerCode = `
517517
const intervalMs = ${intervalMs};
518518
self.onmessage = () => {

0 commit comments

Comments
 (0)