From 114cf9a1cc75ea97ce461079519d161981af1a34 Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Wed, 13 Nov 2024 18:20:40 +0530 Subject: [PATCH] ohos: avoid passing some cli arguments to servo (#34237) These following four OHOS specific arguments are being passed by the OHOS runtime to the EntryAbility, which then passess them on to Servo's argument parsing logic: * `--debugApp=false` * `--send_to_erms_targetAppDistType=os_integration` * `--send_to_erms_targetAppProvisionType=release` * `--send_to_erms_targetBundleType=0` When Servo's argument parsing logic encounters an unrecognized argument, it terminates the process after logging an error to stderr (which is not visible in hilog). This patch simply filters out these arguments so the parsing logic doesn't fail. Signed-off-by: Mukilan Thiyagarajan --- .../entry/src/main/ets/entryability/EntryAbility.ets | 2 ++ 1 file changed, 2 insertions(+) diff --git a/support/openharmony/entry/src/main/ets/entryability/EntryAbility.ets b/support/openharmony/entry/src/main/ets/entryability/EntryAbility.ets index c64c9867391..66ad4c7006f 100644 --- a/support/openharmony/entry/src/main/ets/entryability/EntryAbility.ets +++ b/support/openharmony/entry/src/main/ets/entryability/EntryAbility.ets @@ -15,8 +15,10 @@ export default class EntryAbility extends UIAbility { // Skip some default parameters, since servo is not interested in those if (key.startsWith("ohos.") || key.startsWith("component.") + || key.startsWith("send_to_erms_") || key === "isCallBySCB" || key === "moduleName" + || key === "debugApp" ) { return }