mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-09 19:10:42 +00:00
For #8752: fix invalid AutoplayAction crash
This commit is contained in:
parent
b8d5dc4551
commit
c87c837865
@ -72,6 +72,8 @@ class Settings private constructor(
|
|||||||
private fun Int.toAutoplayAction() = when (this) {
|
private fun Int.toAutoplayAction() = when (this) {
|
||||||
BLOCKED_INT -> AutoplayAction.BLOCKED
|
BLOCKED_INT -> AutoplayAction.BLOCKED
|
||||||
ALLOWED_INT -> AutoplayAction.ALLOWED
|
ALLOWED_INT -> AutoplayAction.ALLOWED
|
||||||
|
// Users from older versions may have saved invalid values. Migrate them to BLOCKED
|
||||||
|
ASK_TO_ALLOW_INT -> AutoplayAction.BLOCKED
|
||||||
else -> throw InvalidParameterException("$this is not a valid SitePermissionsRules.AutoplayAction")
|
else -> throw InvalidParameterException("$this is not a valid SitePermissionsRules.AutoplayAction")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user