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 <mukilan@igalia.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-11-13 18:20:40 +05:30 committed by GitHub
parent 9102644470
commit 114cf9a1cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}