Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
communication_ipc
提交
49f6d614
C
communication_ipc
项目概览
OpenHarmony
/
communication_ipc
大约 1 年 前同步成功
通知
20
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
communication_ipc
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
49f6d614
编写于
10月 11, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
!402 fix codex
Merge pull request !402 from 王宝光/master
上级
fb33ec04
b1b478b9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
10 deletion
+8
-10
ipc/native/src/napi/src/napi_message_sequence.cpp
ipc/native/src/napi/src/napi_message_sequence.cpp
+7
-9
ipc/native/src/napi/src/napi_remote_object.cpp
ipc/native/src/napi/src/napi_remote_object.cpp
+1
-1
未找到文件。
ipc/native/src/napi/src/napi_message_sequence.cpp
浏览文件 @
49f6d614
...
...
@@ -41,7 +41,7 @@ static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_IPC,
#define CHECK_WRITE_CAPACITY(env, lenToWrite, napiParcel) \
do { \
size_t cap =
napiParcel->maxCapacityToWrite_ - napiParcel
->nativeParcel_->GetWritePosition(); \
size_t cap =
(napiParcel)->maxCapacityToWrite_ - (napiParcel)
->nativeParcel_->GetWritePosition(); \
if (cap < (lenToWrite)) { \
ZLOGI(LOG_LABEL, "No enough capacity to write"); \
napi_throw_range_error(env, nullptr, "No enough capacity to write"); \
...
...
@@ -50,17 +50,17 @@ static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_ID_IPC,
#define REWIND_IF_WRITE_CHECK_FAIL(env, lenToWrite, pos, napiParcel) \
do { \
size_t cap =
napiParcel->maxCapacityToWrite_ - napiParcel
->nativeParcel_->GetWritePosition(); \
size_t cap =
(napiParcel)->maxCapacityToWrite_ - (napiParcel)
->nativeParcel_->GetWritePosition(); \
if (cap < (lenToWrite)) { \
ZLOGI(LOG_LABEL, "No enough capacity to write"); \
napiParcel
->nativeParcel_->RewindWrite(pos); \
(napiParcel)
->nativeParcel_->RewindWrite(pos); \
napi_throw_range_error(env, nullptr, "No enough capacity to write"); \
} \
} while (0)
#define CHECK_READ_LENGTH(env, arrayLength, typeSize, napiParcel) \
do { \
size_t remainSize =
napiParcel->nativeParcel_->GetDataSize() - napiParcel
->nativeParcel_->GetReadPosition(); \
size_t remainSize =
(napiParcel)->nativeParcel_->GetDataSize() - (napiParcel)
->nativeParcel_->GetReadPosition(); \
if (((arrayLength) < 0) || ((arrayLength) > remainSize) || (((arrayLength) * (typeSize)) > remainSize)) { \
ZLOGI(LOG_LABEL, "No enough data to read"); \
napi_throw_range_error(env, nullptr, "No enough data to read"); \
...
...
@@ -73,7 +73,7 @@ NAPI_MessageSequence::NAPI_MessageSequence(napi_env env, napi_value thisVar, Mes
maxCapacityToWrite_
=
MAX_CAPACITY_TO_WRITE
;
// do NOT reference js parcel here
if
(
parcel
==
nullptr
)
{
nativeParcel_
=
std
::
shared_ptr
<
MessageParcel
>
(
new
MessageParcel
()
);
nativeParcel_
=
std
::
make_shared
<
MessageParcel
>
(
);
owner
=
true
;
}
else
{
nativeParcel_
=
std
::
shared_ptr
<
MessageParcel
>
(
parcel
,
release
);
...
...
@@ -1044,8 +1044,7 @@ napi_value NAPI_MessageSequence::JS_writeParcelable(napi_env env, napi_callback_
}
napi_value
NAPI_MessageSequence
::
JS_writeParcelableArrayCallJsFunc
(
napi_env
env
,
napi_value
&
element
,
napi_value
&
thisVar
)
napi_value
&
element
,
napi_value
&
thisVar
)
{
napi_value
propKey
=
nullptr
;
const
char
*
propKeyStr
=
"marshalling"
;
...
...
@@ -2121,8 +2120,7 @@ napi_value NAPI_MessageSequence::JS_readStringArray(napi_env env, napi_callback_
}
napi_value
NAPI_MessageSequence
::
JS_readParcelableArrayCallJsFunc
(
napi_env
env
,
napi_value
&
element
,
napi_value
&
thisVar
)
napi_value
&
element
,
napi_value
&
thisVar
)
{
napi_value
propKey
=
nullptr
;
const
char
*
propKeyStr
=
"unmarshalling"
;
...
...
ipc/native/src/napi/src/napi_remote_object.cpp
浏览文件 @
49f6d614
...
...
@@ -95,7 +95,7 @@ private:
ThreadLockInfo
*
lockInfo
;
int
result
;
};
int
OnJsRemoteRequest
(
CallbackParam
*
p
aram
);
int
OnJsRemoteRequest
(
CallbackParam
*
jsP
aram
);
};
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录