!319 将JS应用默认运行模式由snapshot模式改为JS parser模式

Merge pull request !319 from wuhy_irobot2013/0827_jerry_snapshot_fix
This commit is contained in:
openharmony_ci
2021-08-30 11:45:04 +00:00
committed by Gitee
5 changed files with 34 additions and 26 deletions
+14 -11
View File
@@ -37,17 +37,20 @@ The source code of the framework is stored in **/foundation/ace/ace\_engine\_li
```
/foundation/ace/ace_engine_lite
├── frameworks # Framework code
│ ├── examples # Sample code
│ ├── include # Header files
│ ├── packages # JavaScript implementation
├── src # Source code
├── targets # Configuration files of target devices
── tools # Tool code
├── interfaces # APIs exposed externally
── innerkits # Header files for internal subsystems
└── builtin # JavaScript third-party module APIs exposed by the JS UI framework
── test # Test cases
├── frameworks # Framework code
│ ├── common # Common kits
│ ├── examples # Sample code
│ ├── include # Header files
   ├── module_manager # JS module manager
   ├── native_engine # JS engine adapter
── packages # JavaScript implementation
│ ├── src # Source code
── targets # Configuration files of target devices
└── tools # Tool code
── interfaces # APIs exposed externally
│ └── innerkits # Header files for internal subsystems
│ └── builtin # JavaScript third-party module APIs exposed by the JS UI framework
└── test # Test cases
```
## Available APIs<a name="section1096322014288"></a>
+14 -11
View File
@@ -36,17 +36,20 @@ JS-UI框架子系统源代码在/foundation/ace/ace\_engine\_lite下,目录结
```
/foundation/ace/ace_engine_lite
├── frameworks # 框架代码目录
├── examples # 示例代码目录
│ ├── include # 头文件目录
│ ├── packages # 框架JS实现存放目录
├── src # 源代码存放目录
├── targets # 各目标设备配置文件存放目录
── tools # 工具代码存放目录
├── interfaces # 对外接口存放目录
── innerkits # 对内部子系统暴露的头文件存放目录
└── builtin # JS-UI框架子系统对外暴露JS三方module API接口存放目录
── test # 测试用例目录
├── frameworks # 框架代码目录
   ├── common # 公共工具类目录
│ ├── examples # 示例代码目录
│ ├── include # 头文件目录
   ├── module_manager # JS模块管理类目录
   ├── native_engine # JS引擎适配层目录
── packages # 框架JS实现存放目录
│ ├── src # 源代码存放目录
── targets # 各目标设备配置文件存放目录
└── tools # 工具代码存放目录
── interfaces # 对外接口存放目录
│ └── innerkits # 对内部子系统暴露的头文件存放目录
│ └── builtin # JS-UI框架子系统对外暴露JS三方module API接口存放目录
└── test # 测试用例目录
```
## 接口<a name="section1096322014288"></a>
+1 -1
View File
@@ -131,7 +131,7 @@
#define PROFILER_ENABLE_FLAG_FILE "/user/data/profiler_enable"
#define RUNTIME_MODE_FILE_PATH "/user/data/jsparser_enable"
#define RUNTIME_MODE_FILE_PATH "/user/data/js_snapshot_enable"
#endif // OHOS_ACELITE_CONFIG_H
+1 -1
View File
@@ -152,6 +152,6 @@
#define PROFILER_ENABLE_FLAG_FILE "/storage/user/data/profiler_enable"
#define RUNTIME_MODE_FILE_PATH "/storage/user/data/jsparser_enable"
#define RUNTIME_MODE_FILE_PATH "/storage/user/data/js_snapshot_enable"
#endif // OHOS_ACELITE_CONFIG_H
+4 -2
View File
@@ -47,10 +47,12 @@ void SetEngineSnapshotMode(bool &mode)
void SetEngineSnapshotModeManually(bool &mode)
{
#ifndef TARGET_SIMULATOR
#if (defined(__LINUX__) || defined(__LITEOS_A__))
// if not starting debugger, on real device, give a chance to use JS mode manually
mode = IsFileExisted(RUNTIME_MODE_FILE_PATH);
#elif !defined(TARGET_SIMULATOR)
mode = !(IsFileExisted(RUNTIME_MODE_FILE_PATH));
#endif // TARGET_SIMULATOR
#endif
}
void Terminate(uint16_t token)