RDKEMW-24305: [nativescript]xuaHeartbeat Analytics Event Is Not Trigg… - #143
Merged
Merged
Conversation
…ered During Playback Reason for change: Added polyfills for timeout, setinterval Test Procedure: Playback should be pass Risks: low Priority: P2
Contributor
There was a problem hiding this comment.
🟡 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, andbindsupport 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):argumentshas noslicemethod, causing aTypeErrorinstead of registering the interval. UseArray.prototype.slice.call(args, 2)here as well.
var callbackArgs = args.slice(2);
src/jsc/modules/linkedjsdomwrapper.js:249
- This custom
bindignores the timer ID bound afterthisArg, soclearInterval.bind(null, intervalId)()clearsundefinedand 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.
vjain008
approved these changes
Sep 11, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
…ered During Playback
Reason for change: Added polyfills for timeout, setinterval
Test Procedure: Playback should be pass
Risks: low
Priority: P2