mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb: Remove exceptions from DOMPoint because allocate is unfailable
This commit is contained in:
parent
271bfa63f3
commit
38bc8836d6
Notes:
sideshowbarker
2024-07-17 18:23:22 +09:00
Author: https://github.com/bplaat
Commit: 38bc8836d6
Pull-request: https://github.com/SerenityOS/serenity/pull/20584
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
5 changed files with 8 additions and 9 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Web::Geometry {
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMPointReadOnly>> DOMPointReadOnly::construct_impl(JS::Realm& realm, double x, double y, double z, double w)
|
||||
JS::NonnullGCPtr<DOMPointReadOnly> DOMPointReadOnly::construct_impl(JS::Realm& realm, double x, double y, double z, double w)
|
||||
{
|
||||
return realm.heap().allocate<DOMPointReadOnly>(realm, realm, x, y, z, w);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ DOMPointReadOnly::DOMPointReadOnly(JS::Realm& realm, double x, double y, double
|
|||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#dom-dompointreadonly-frompoint
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMPointReadOnly>> DOMPointReadOnly::from_point(JS::VM& vm, DOMPointInit const& other)
|
||||
JS::NonnullGCPtr<DOMPointReadOnly> DOMPointReadOnly::from_point(JS::VM& vm, DOMPointInit const& other)
|
||||
{
|
||||
// The fromPoint(other) static method on DOMPointReadOnly must create a DOMPointReadOnly from the dictionary other.
|
||||
return construct_impl(*vm.current_realm(), other.x, other.y, other.z, other.w);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue