diff --git a/src/JavaScriptContextBase.cpp b/src/JavaScriptContextBase.cpp index 086b7c9..8bee572 100644 --- a/src/JavaScriptContextBase.cpp +++ b/src/JavaScriptContextBase.cpp @@ -154,13 +154,26 @@ void JavaScriptContextBase::populateModulesPath() if(getenv("JSRUNTIME_MODULES_PATH")) { std::cout<<"JSRUNTIME_MODULES_PATH variable is set"<setUrl(mContextMap[id].url); - if(context->getModuleSettings().enableJSDOM) + if(context->getModuleSettings().enableMiniJSDOM) { std::stringstream window; window<<"window.location = {\"href\":\"" << url << "\"};"; @@ -378,7 +378,7 @@ void NativeJSRenderer::runApplicationInternal(ApplicationRequest& appRequest) NativeJSLogger::log(INFO, "About to launch local app\n"); JavaScriptContext* context = (JavaScriptContext*)mContextMap[id].context; context->setUrl(mContextMap[id].url); - if(context->getModuleSettings().enableJSDOM) + if(context->getModuleSettings().enableMiniJSDOM) { std::stringstream window; window<<"window.location = {\"href\":\"file:/" << url << "\"};"; diff --git a/src/jsc/JavaScriptContext.cpp b/src/jsc/JavaScriptContext.cpp index c70e11a..d9fdd8e 100644 --- a/src/jsc/JavaScriptContext.cpp +++ b/src/jsc/JavaScriptContext.cpp @@ -139,16 +139,16 @@ 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) + if(!getenv("ETHAN_LOGGING_PIPE")) { - std::cout<<"dlopen error for jsc library " << dlerror() << std::endl; + // This is required for NativeJS Plugin + 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; + } } - #endif - void *aampJSBindingsLibHandle = dlopen(aampJSBindingsLib, RTLD_NOW | RTLD_GLOBAL); if (aampJSBindingsLibHandle) { @@ -174,7 +174,8 @@ void JavaScriptContext::unloadAAMPJSBindingsLib() if (nullptr != gAAMPJSBindings->PlayerLibHandle) { dlclose(gAAMPJSBindings->PlayerLibHandle); - //dlclose(jscLibHandle); + if(!getenv("ETHAN_LOGGING_PIPE")) + dlclose(jscLibHandle); } }