diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 435668b090..5303309a3d 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -3370,8 +3371,7 @@ void Document::shared_declarative_refresh_steps(StringView input, JS::GCPtr(); + auto maybe_time = Web::HTML::parse_non_negative_integer(time_string); // FIXME: Since we only collected ASCII digits, this can only fail because of overflow. What do we do when that happens? For now, default to 0. if (maybe_time.has_value() && maybe_time.value() < NumericLimits::max() && !Checked::multiplication_would_overflow(static_cast(maybe_time.value()), 1000)) {