Skip to content

Conversation

@trupthi1403
Copy link
Contributor

Reason for change: Changes done to compile newly added test cases
Test Procedure: Able to build and run test cases in CI
Risks: low
Priority: P2

@trupthi1403 trupthi1403 requested a review from a team as a code owner October 31, 2025 09:19
@madanagopalt madanagopalt requested a review from Copilot November 3, 2025 13:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request refactors code organization by moving inline class and struct definitions from .cpp files to header files, improves thread safety in console mode operations, and adds conditional key mappings for unit tests.

  • Moved TimeoutQueue, TimeoutInfo, TimeoutInfoComparator, and rtHttpRequestEx class/struct definitions from implementation to header files for better code organization
  • Enhanced thread safety in console mode by using managed threads and shutdown flags to prevent race conditions and ensure proper cleanup
  • Added conditional compilation support for additional Wayland key mappings when building for unit tests

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/jsc/JavaScriptUtils.cpp Moved inline class/struct definitions to header; methods now reference classes from header
include/jsc/JavaScriptUtils.h Added declarations for TimeoutQueue, TimeoutInfo, TimeoutInfoComparator, and rtHttpRequestEx
src/NativeJSRenderer.cpp Replaced detached thread with managed thread; added shutdown flag and proper thread cleanup
include/NativeJSRenderer.h Added thread member, shutdown flag, and static consoleLoop variable
src/linux/KeyInput.cpp Added conditional key mappings for unit test builds
include/jsc/JavaScriptContext.h Made setPlaybackStartTime virtual
include/EssosInstance.h Whitespace/formatting changes
.github/workflows/jsruntime_L1tests.yml Updated test reference branch

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 555 to 560
bool NativeJSRenderer::consoleLoop = true;
void handleDevConsoleSigInt(int /*sig*/) {
NativeJSRenderer::consoleLoop = false;
}
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

The static consoleLoop variable is accessed from multiple threads (signal handler and main thread) without synchronization. Consider using std::atomic<bool> instead of bool for thread-safe access.

Copilot uses AI. Check for mistakes.
@trupthi1403 trupthi1403 force-pushed the topic/RDKEMW-8844 branch 2 times, most recently from 73d275b to 750f0a1 Compare November 4, 2025 09:29
    Reason for change: Changes done to compile newly added test cases
    Test Procedure: Able to build and run test cases in CI
    Risks: low
    Priority: P2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants