mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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
Notes:
sideshowbarker
2024-07-16 22:18:54 +09:00
Author: https://github.com/ADKaster
Commit: d361221657
Pull-request: https://github.com/SerenityOS/serenity/pull/22352
Reviewed-by: https://github.com/trflynn89
8 changed files with 13 additions and 7 deletions
|
@ -942,7 +942,7 @@ WebIDL::ExceptionOr<SerializedTransferRecord> structured_serialize_with_transfer
|
|||
// FIXME: 2. If transferable has an [[ArrayBufferData]] internal slot and IsSharedArrayBuffer(transferable) is true, then throw a "DataCloneError" DOMException.
|
||||
|
||||
// 3. If memory[transferable] exists, then throw a "DataCloneError" DOMException.
|
||||
auto transferable_value = JS::Value(transferable.ptr());
|
||||
auto transferable_value = JS::Value(transferable);
|
||||
if (memory.contains(transferable_value)) {
|
||||
return WebIDL::DataCloneError::create(*vm.current_realm(), "Cannot transfer value twice"_fly_string);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue