Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
communication_ipc
提交
330b4bc7
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,发现更多精彩内容 >>
提交
330b4bc7
编写于
12月 20, 2021
作者:
L
liangshenglin1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug of JS RemoteObject constructor and translate RemoteObject array.
Signed-off-by:
N
liangshenglin1
<
liangshenglin1@huawei.com
>
上级
356c98fb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
7 deletion
+5
-7
ipc/native/src/mock/include/dbinder_base_invoker.h
ipc/native/src/mock/include/dbinder_base_invoker.h
+1
-1
ipc/native/src/napi/include/napi_ashmem.h
ipc/native/src/napi/include/napi_ashmem.h
+2
-2
ipc/native/src/napi/src/napi_remote_object.cpp
ipc/native/src/napi/src/napi_remote_object.cpp
+2
-4
未找到文件。
ipc/native/src/mock/include/dbinder_base_invoker.h
浏览文件 @
330b4bc7
...
@@ -239,7 +239,7 @@ bool DBinderBaseInvoker<T>::IRemoteObjectTranslate(char *dataBuffer, binder_size
...
@@ -239,7 +239,7 @@ bool DBinderBaseInvoker<T>::IRemoteObjectTranslate(char *dataBuffer, binder_size
}
}
uint32_t
totalSize
=
0
;
uint32_t
totalSize
=
0
;
uintptr_t
*
binderObjectsOffsets
=
reinterpret_cast
<
uintptr
_t
*>
(
data
.
GetObjectOffsets
());
binder_size_t
*
binderObjectsOffsets
=
reinterpret_cast
<
binder_size
_t
*>
(
data
.
GetObjectOffsets
());
uint32_t
offsetOfSession
=
buffer_size
+
data
.
GetOffsetsSize
()
*
sizeof
(
binder_size_t
);
uint32_t
offsetOfSession
=
buffer_size
+
data
.
GetOffsetsSize
()
*
sizeof
(
binder_size_t
);
char
*
flatOffset
=
dataBuffer
+
offsetOfSession
;
char
*
flatOffset
=
dataBuffer
+
offsetOfSession
;
...
...
ipc/native/src/napi/include/napi_ashmem.h
浏览文件 @
330b4bc7
...
@@ -33,7 +33,7 @@ public:
...
@@ -33,7 +33,7 @@ public:
explicit
NAPIAshmem
(
sptr
<
Ashmem
>
&
ashmem
);
explicit
NAPIAshmem
(
sptr
<
Ashmem
>
&
ashmem
);
NAPIAshmem
()
:
ashmem_
(
nullptr
){}
NAPIAshmem
()
:
ashmem_
(
nullptr
){}
~
NAPIAshmem
()
=
default
;
~
NAPIAshmem
()
=
default
;
sptr
<
Ashmem
>
&
GetAshmem
()
const
sptr
<
Ashmem
>
&
GetAshmem
()
{
{
return
ashmem_
;
return
ashmem_
;
}
}
...
@@ -58,4 +58,4 @@ private:
...
@@ -58,4 +58,4 @@ private:
sptr
<
Ashmem
>
ashmem_
;
sptr
<
Ashmem
>
ashmem_
;
};
};
}
// namespace OHOS
}
// namespace OHOS
#endif
#endif
\ No newline at end of file
ipc/native/src/napi/src/napi_remote_object.cpp
浏览文件 @
330b4bc7
...
@@ -765,11 +765,9 @@ napi_value NAPI_ohos_rpc_CreateJsRemoteObject(napi_env env, const sptr<IRemoteOb
...
@@ -765,11 +765,9 @@ napi_value NAPI_ohos_rpc_CreateJsRemoteObject(napi_env env, const sptr<IRemoteOb
std
::
string
desc
=
Str16ToStr8
(
descriptor
);
std
::
string
desc
=
Str16ToStr8
(
descriptor
);
napi_value
jsDesc
=
nullptr
;
napi_value
jsDesc
=
nullptr
;
napi_create_string_utf8
(
env
,
desc
.
c_str
(),
desc
.
length
(),
&
jsDesc
);
napi_create_string_utf8
(
env
,
desc
.
c_str
(),
desc
.
length
(),
&
jsDesc
);
napi_value
len
=
nullptr
;
napi_create_int32
(
env
,
desc
.
length
(),
&
len
);
// create a new js remote object
// create a new js remote object
size_t
argc
=
2
;
size_t
argc
=
1
;
napi_value
argv
[
2
]
=
{
jsDesc
,
len
};
napi_value
argv
[
1
]
=
{
jsDesc
};
napi_value
jsRemoteObject
=
nullptr
;
napi_value
jsRemoteObject
=
nullptr
;
status
=
napi_new_instance
(
env
,
constructor
,
argc
,
argv
,
&
jsRemoteObject
);
status
=
napi_new_instance
(
env
,
constructor
,
argc
,
argv
,
&
jsRemoteObject
);
NAPI_ASSERT
(
env
,
status
==
napi_ok
,
"failed to construct js RemoteObject"
);
NAPI_ASSERT
(
env
,
status
==
napi_ok
,
"failed to construct js RemoteObject"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录