mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
LibJS+LibWeb: Add JS::Value constructor for `JS::Handle<T>
`
Similar to the constructors for ``JS::{Nonnull}GCPtr<T>``, this helper avoids unnecessary .ptr() clutter when we want to construct Values.
This commit is contained in:
parent
9624eca116
commit
d361221657
8 changed files with 13 additions and 7 deletions
|
@ -133,7 +133,7 @@ namespace Web {
|
|||
|
||||
inline JS::Completion throw_completion(JS::NonnullGCPtr<WebIDL::DOMException> exception)
|
||||
{
|
||||
return JS::throw_completion(JS::Value(static_cast<JS::Object*>(exception.ptr())));
|
||||
return JS::throw_completion(JS::Value(exception));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue