Skip to content

RDKEMW-24305: [nativescript]xuaHeartbeat Analytics Event Is Not Trigg… - #143

Merged
vjain008 merged 1 commit into
developfrom
topic/RDKEMW-24305
Sep 11, 2026
Merged

vjain008 merged 1 commit into
developfrom
topic/RDKEMW-24305

Conversation

@gurpreet319

Copy link
Copy Markdown
Contributor

…ered During Playback

Reason for change: Added polyfills for timeout, setinterval
Test Procedure: Playback should be pass
Risks: low
Priority: P2

…ered During Playback

Reason for change: Added polyfills for timeout, setinterval
Test Procedure: Playback should be pass
Risks: low
Priority: P2
@gurpreet319
gurpreet319 requested a review from a team as a code owner September 11, 2026 04:52
Copilot AI lite review requested due to automatic review settings September 11, 2026 04:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Correct the timer apply and bind implementations before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds timer polyfills to the linked JSDOM wrapper to support playback analytics callbacks.

Changes:

  • Adds apply, call, and bind support for timer APIs.
  • Exposes timer functions on window.
  • Wraps clear-timer functions.
File summaries
File Summary
src/jsc/modules/linkedjsdomwrapper.js Adds timer polyfills, but apply mishandles array-like arguments and bind drops bound arguments.
Review details

Suppressed comments (2)

src/jsc/modules/linkedjsdomwrapper.js:213

  • The same array-only assumption breaks setInterval.apply(this, arguments): arguments has no slice method, causing a TypeError instead of registering the interval. Use Array.prototype.slice.call(args, 2) here as well.
    var callbackArgs = args.slice(2);

src/jsc/modules/linkedjsdomwrapper.js:249

  • This custom bind ignores the timer ID bound after thisArg, so clearInterval.bind(null, intervalId)() clears undefined and the interval continues running. Preserve and prepend the bound arguments before selecting the ID.
clearInterval.bind = function(thisArg) {
    return function(id) { return clearInterval(id); };
};
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/jsc/modules/linkedjsdomwrapper.js
Comment thread src/jsc/modules/linkedjsdomwrapper.js
@vjain008
vjain008 merged commit da81b87 into develop Sep 11, 2026
9 of 10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants