mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Increase custom property size limit a bit.
Differential Revision: https://phabricator.services.mozilla.com/D105978
This commit is contained in:
parent
b90f5f099f
commit
786b08a669
1 changed files with 3 additions and 3 deletions
|
@ -174,11 +174,11 @@ impl VariableValue {
|
|||
/// Prevent values from getting terribly big since you can use custom
|
||||
/// properties exponentially.
|
||||
///
|
||||
/// This number (1MB) is somewhat arbitrary, but silly enough that no
|
||||
/// sane page would hit it. We could limit by number of total
|
||||
/// This number (2MB) is somewhat arbitrary, but silly enough that no
|
||||
/// reasonable page should hit it. We could limit by number of total
|
||||
/// substitutions, but that was very easy to work around in practice
|
||||
/// (just choose a larger initial value and boom).
|
||||
const MAX_VALUE_LENGTH_IN_BYTES: usize = 1024 * 1024;
|
||||
const MAX_VALUE_LENGTH_IN_BYTES: usize = 2 * 1024 * 1024;
|
||||
|
||||
if self.css.len() + css.len() > MAX_VALUE_LENGTH_IN_BYTES {
|
||||
return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue