1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:38:13 +00:00

LibWeb: Port DOMException interface from DeprecatedString to String

This commit is contained in:
Shannon Booth 2023-09-06 16:03:01 +12:00 committed by Tim Flynn
parent bcb6851c07
commit 41928c2902
65 changed files with 296 additions and 296 deletions

View file

@ -119,7 +119,7 @@ WebIDL::ExceptionOr<HighResolutionTime::DOMHighResTimeStamp> Performance::conver
// 5. If endTime is 0, throw an InvalidAccessError.
if (end_time == 0)
return WebIDL::InvalidAccessError::create(realm, DeprecatedString::formatted("The '{}' entry in the PerformanceTiming interface is equal to 0, meaning it hasn't happened yet", name));
return WebIDL::InvalidAccessError::create(realm, MUST(String::formatted("The '{}' entry in the PerformanceTiming interface is equal to 0, meaning it hasn't happened yet", name)));
// 6. Return result of subtracting startTime from endTime.
return static_cast<HighResolutionTime::DOMHighResTimeStamp>(end_time - start_time);
@ -153,7 +153,7 @@ WebIDL::ExceptionOr<HighResolutionTime::DOMHighResTimeStamp> Performance::conver
});
if (!maybe_entry.has_value())
return WebIDL::SyntaxError::create(realm, DeprecatedString::formatted("No PerformanceMark object with name '{}' found in the performance timeline", mark_string));
return WebIDL::SyntaxError::create(realm, MUST(String::formatted("No PerformanceMark object with name '{}' found in the performance timeline", mark_string)));
return maybe_entry.value()->start_time();
}