зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1693886
- Increase custom property size limit a bit. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D105978
This commit is contained in:
Родитель
fcc688c7f7
Коммит
722a19defe
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче