From 394517c3c5b879766b8345d45a5d61b101f4c665 Mon Sep 17 00:00:00 2001 From: crazy_hu Date: Mon, 24 Oct 2022 09:01:39 +0000 Subject: [PATCH] update method name Signed-off-by: crazy_hu --- zh-cn/application-dev/reference/apis/js-apis-rpc.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-rpc.md b/zh-cn/application-dev/reference/apis/js-apis-rpc.md index 5d33079a1e..600db31d22 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-rpc.md +++ b/zh-cn/application-dev/reference/apis/js-apis-rpc.md @@ -6703,7 +6703,7 @@ addDeathRecipient(recipient : DeathRecipient, flags : number): boolean ### unregisterDeathRecipient9+ -removeDeathRecipient(recipient: DeathRecipient, flags: number): void +unregisterDeathRecipient(recipient: DeathRecipient, flags: number): void 注销用于接收远程对象死亡通知的回调。 @@ -6839,6 +6839,7 @@ getInterfaceDescriptor(): string | 错误码ID | 错误信息 | | -------- | ------- | | 1900008 | proxy or remote object is invalid | + | 1900007 | communication failed | **示例:** @@ -7301,8 +7302,8 @@ static flushCmdBuffer(object : IRemoteObject): void constructor(descriptor) { super(descriptor); } - addDeathRecipient(recipient: MyDeathRecipient, flags: number); - removeDeathRecipient(recipient: MyDeathRecipient, flags: number); + registerDeathRecipient(recipient: MyDeathRecipient, flags: number); + unregisterDeathRecipient(recipient: MyDeathRecipient, flags: number); isObjectDead(): boolean { return false; } @@ -7721,10 +7722,8 @@ sendMessageRequest(code: number, data: MessageSequence, reply: MessageSequence, constructor(descriptor) { super(descriptor); } - addDeathRecipient(recipient: MyDeathRecipient, flags: number); - removeDeathRecipient(recipient: MyDeathRecipient, flags: number): boolean { - return true; - } + registerDeathRecipient(recipient: MyDeathRecipient, flags: number); + unregisterDeathRecipient(recipient: MyDeathRecipient, flags: number); isObjectDead(): boolean { return false; } -- GitLab