mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-21 00:35:30 -04:00
!319 将JS应用默认运行模式由snapshot模式改为JS parser模式
Merge pull request !319 from wuhy_irobot2013/0827_jerry_snapshot_fix
This commit is contained in:
@@ -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
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user