mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
@@ -1674,7 +1674,7 @@ void MainThread::HandleLaunchApplication(const AppLaunchData &appLaunchData, con
|
||||
AbilityRuntime::JsRuntime::InheritPluginNamespace(pluginModuleNames);
|
||||
}
|
||||
auto lddictionaries = ParsePluginDefaultNamespaceLdDictionary();
|
||||
if (lddictionaries.size() > 0) {
|
||||
if (!lddictionaries.empty()) {
|
||||
AbilityRuntime::JsRuntime::CreatePluginDefaultNamespace(lddictionaries);
|
||||
}
|
||||
}
|
||||
@@ -4230,13 +4230,11 @@ bool MainThread::IsPluginNamespaceInherited()
|
||||
return isPluginNamespaceInherited_;
|
||||
}
|
||||
|
||||
std::vector<std::string> MainThread::ParsePluginDefaultNamespaceLdDictionary()
|
||||
std::string MainThread::ParsePluginDefaultNamespaceLdDictionary()
|
||||
{
|
||||
auto pluginDefaultNamespaceLdDictionary_ = system::GetParameter(PLUGIN_DEFAULT_NAMESPACE_LDDICTIONARY, "");
|
||||
pluginDefaultNamespaceLdDictionary_ = system:: (PLUGIN_DEFAULT_NAMESPACE_LDDICTIONARY, "");
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "plugin_default_namespace_lddictionary: %{public}s", pluginDefaultNamespaceLdDictionary_.c_str());
|
||||
std::vector<std::string> result;
|
||||
SplitStr(pluginDefaultNamespaceLdDictionary_, ":", result);
|
||||
return result;
|
||||
return pluginDefaultNamespaceLdDictionary_;
|
||||
}
|
||||
|
||||
void MainThread::SleepCleanKill()
|
||||
|
||||
@@ -101,7 +101,6 @@ const std::string NAMESPACE = "namespace";
|
||||
const std::string TARGET_OHM = "targetohm";
|
||||
const std::string SINCE_VERSION = "sinceVersion";
|
||||
const std::string DEFAULT_PLUGIN = "defaultPlugin";
|
||||
const
|
||||
|
||||
constexpr char DEVELOPER_MODE_STATE[] = "const.security.developermode.state";
|
||||
const std::string MERGE_SOURCE_MAP_PATH = "ets/sourceMaps.map";
|
||||
@@ -949,7 +948,7 @@ void JsRuntime::InheritPluginNamespace(const std::vector<std::string> &moduleNam
|
||||
}
|
||||
}
|
||||
|
||||
void JsRuntime::CreatePluginDefaultNamespace(const std::vector<std::string> &lddictionaries)
|
||||
void JsRuntime::CreatePluginDefaultNamespace(const std::string &lddictionaries)
|
||||
{
|
||||
Security::AccessToken::AccessTokenID selfToken = IPCSkeleton::GetSelfTokenID();
|
||||
int result = Security::AccessToken::AccessTokenKit::VerifyAccessToken(selfToken, PERMISSION_LOAD_INDEPENDENT_LIBRARY);
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
static void SetAppLibPath(const AppLibPathMap& appLibPaths, const bool& isSystemApp = false);
|
||||
static void InheritPluginNamespace(const std::vector<std::string> &moduleNames);
|
||||
static void CreatePluginDefaultNamespace(const std::vector<std::string> &lddictorys);
|
||||
static void CreatePluginDefaultNamespace(const std::string &lddictorys);
|
||||
|
||||
static bool ReadSourceMapData(const std::string& hapPath, const std::string& sourceMapPath, std::string& content);
|
||||
JsRuntime();
|
||||
|
||||
@@ -687,7 +687,7 @@ private:
|
||||
|
||||
bool IsPluginNamespaceInherited();
|
||||
|
||||
std::vector<std::string> ParsePluginDefaultNamespaceLdDictionary();
|
||||
std::string ParsePluginDefaultNamespaceLdDictionary();
|
||||
|
||||
/**
|
||||
* @brief parse app configuration params
|
||||
|
||||
Reference in New Issue
Block a user