Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
813 stars 105 forks source link

[chromium] Add NullPointerException in PromptDelegateImpl #1268

Closed mshin-wolvic closed 8 months ago

mshin-wolvic commented 8 months ago

This patch adds NullPointerException since mDelegate can be null.

mshin-wolvic commented 8 months ago

Personally I think it's better to add a null check instead of a try-catch. The reason is because having a null delegate is a valid code path more than an exceptional case, so I prefer to handle it as any other "normal" code path.

You could use this same PR to change the exception check that you added in #1256

Done