未验证 提交 37e74c28 编写于 作者: O openharmony_ci 提交者: Gitee

!18474 (挑单3.2release)【IPC&RPC】修改示例代码

Merge pull request !18474 from Lixiaoying25/cherry-pick-1684737255
...@@ -6821,8 +6821,8 @@ unregisterDeathRecipient(recipient: DeathRecipient, flags: number): void ...@@ -6821,8 +6821,8 @@ unregisterDeathRecipient(recipient: DeathRecipient, flags: number): void
} }
let deathRecipient = new MyDeathRecipient(); let deathRecipient = new MyDeathRecipient();
try { try {
proxy.registerDeathRecippient(deathRecipient, 0); proxy.registerDeathRecipient(deathRecipient, 0);
proxy.unregisterDeathRecippient(deathRecipient, 0); proxy.unregisterDeathRecipient(deathRecipient, 0);
} catch(error) { } catch(error) {
console.info("proxy register deathRecipient fail, errorCode " + error.code); console.info("proxy register deathRecipient fail, errorCode " + error.code);
console.info("proxy register deathRecipient fail, errorMessage " + error.message); console.info("proxy register deathRecipient fail, errorMessage " + error.message);
...@@ -6893,7 +6893,7 @@ removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean ...@@ -6893,7 +6893,7 @@ removeDeathRecipient(recipient: DeathRecipient, flags: number): boolean
} }
} }
let deathRecipient = new MyDeathRecipient(); let deathRecipient = new MyDeathRecipient();
proxy.addDeathRecippient(deathRecipient, 0); proxy.addDeathRecipient(deathRecipient, 0);
proxy.removeDeathRecipient(deathRecipient, 0); proxy.removeDeathRecipient(deathRecipient, 0);
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册