Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [1.0.8](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.7...1.0.8)

- RDKEMW-8952 : Switching between Xumo Fast Channels and Vipa activated… [`#71`](https://github.com/rdkcentral/rdkNativeScript/pull/71)
- RDKEMW-8952 : Switching between Xumo Fast Channels and Vipa activated Channels [`505914d`](https://github.com/rdkcentral/rdkNativeScript/commit/505914dbfa6dbe842c7ec46e169ccca47ca6032b)
- Merge tag '1.0.7' into develop [`d367c14`](https://github.com/rdkcentral/rdkNativeScript/commit/d367c14f8efa22be9632ba692ed658321402a0e3)

#### [1.0.7](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.6...1.0.7)

- Switching between Xumo Fast Channels and Vipa activated… [`#68`](https://github.com/rdkcentral/rdkNativeScript/pull/68)
> 30 September 2025

- RDKEMW-8952 : Switching between Xumo Fast Channels and Vipa activated… [`#68`](https://github.com/rdkcentral/rdkNativeScript/pull/68)
- RDKEMW-5610 : L1 test cases for jsruntime [`#66`](https://github.com/rdkcentral/rdkNativeScript/pull/66)
- Deploy fossid_integration_stateless_diffscan_target_repo action [`#67`](https://github.com/rdkcentral/rdkNativeScript/pull/67)
- Deploy cla action [`#40`](https://github.com/rdkcentral/rdkNativeScript/pull/40)
- Update CODEOWNERS [`#63`](https://github.com/rdkcentral/rdkNativeScript/pull/63)
- Switching between Xumo Fast Channels and Vipa activated Channels [`228cf8b`](https://github.com/rdkcentral/rdkNativeScript/commit/228cf8bfdde6d7f7d991805193038b392bc0e89b)
- 1.0.7 release changelog updates [`0f3be4f`](https://github.com/rdkcentral/rdkNativeScript/commit/0f3be4fecad9213a4d86c828e978c29199e5d190)
- RDKEMW-8952 : Switching between Xumo Fast Channels and Vipa activated Channels [`228cf8b`](https://github.com/rdkcentral/rdkNativeScript/commit/228cf8bfdde6d7f7d991805193038b392bc0e89b)
- Merge tag '1.0.6' into develop [`afdf341`](https://github.com/rdkcentral/rdkNativeScript/commit/afdf341c4f81e7019d76f207c7b428dbd0ffc00d)

#### [1.0.6](https://github.com/rdkcentral/rdkNativeScript/compare/1.0.5...1.0.6)
Expand Down
14 changes: 7 additions & 7 deletions src/jsc/JavaScriptContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ static AAMPJSBindings* gAAMPJSBindings = nullptr;
//BIG CHANGE
extern void functionLoadModule(JSGlobalContextRef ref, JSObjectRef globalObjectRef, char* buffer, int len, char* name);

static const char* envValue = std::getenv("NATIVEJS_DUMP_NETWORKMETRIC");

JSContextGroupRef globalContextGroup()
{
static JSContextGroupRef gGroupRef = JSContextGroupCreate();
Expand Down Expand Up @@ -134,13 +132,17 @@ void JavaScriptContext::loadAAMPJSBindingsLib()
if (nullptr == gAAMPJSBindings->PlayerLibHandle)
{
static const char *aampJSBindingsLib = "libaampjsbindings.so";
// This is required for NativeJS Plugin
#if 0
static const char *jscLib = "libJavaScriptCore.so";
jscLibHandle = dlopen(jscLib, RTLD_NOW | RTLD_GLOBAL);
if (!jscLibHandle)
{
std::cout<<"dlopen error for jsc library " << dlerror() << std::endl;
}
void *aampJSBindingsLibHandle = dlopen(aampJSBindingsLib, RTLD_NOW | RTLD_GLOBAL);
#endif

void *aampJSBindingsLibHandle = dlopen(aampJSBindingsLib, RTLD_NOW | RTLD_GLOBAL);
if (aampJSBindingsLibHandle)
{
gAAMPJSBindings->PlayerLibHandle = aampJSBindingsLibHandle;
Expand All @@ -165,7 +167,7 @@ void JavaScriptContext::unloadAAMPJSBindingsLib()
if (nullptr != gAAMPJSBindings->PlayerLibHandle)
{
dlclose(gAAMPJSBindings->PlayerLibHandle);
dlclose(jscLibHandle);
//dlclose(jscLibHandle);

}
}
Expand Down Expand Up @@ -481,9 +483,7 @@ void JavaScriptContext::onMetricsData (NetworkMetrics *net)
rtString key = net->url;
mNetworkMetricsData->set(key, rtValue((void *)net));

if (envValue) {
dumpNetworkMetricData(net, this->getUrl());
}
dumpNetworkMetricData(net, this->getUrl());
}

void JavaScriptContext::dumpNetworkMetricData(NetworkMetrics *metrics, std::string appUrl)
Expand Down
3 changes: 2 additions & 1 deletion src/jsc/JavaScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ void JavaScriptEngine::collectGarbage()
{
if (gTopLevelContext)
{
JSSynchronousGarbageCollectForDebugging(gTopLevelContext);
//JSSynchronousGarbageCollectForDebugging(gTopLevelContext);
JSGarbageCollect(gTopLevelContext);
}
}
3 changes: 2 additions & 1 deletion src/jsc/JavaScriptUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ std::thread::id gMainThreadId;

static std::list<std::function<void ()>> gPendingFun;
static std::mutex gDispatchMutex;
static const char* envValue = std::getenv("NATIVEJS_DUMP_NETWORKMETRIC");

struct TimeoutInfo
{
Expand Down Expand Up @@ -232,7 +233,7 @@ class rtHttpRequestEx : public rtHttpRequest
resp->setHeaders(downloadRequest->headerData(), downloadRequest->headerDataSize());
resp->setDownloadedData(downloadRequest->downloadedData(), downloadRequest->downloadedDataSize());

if (mMetricsListener)
if (mMetricsListener && envValue)
{
rtLogWarn("metriclistener");
NetworkMetrics *metrics = new NetworkMetrics();
Expand Down