mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibWeb: Make DOMException GC-allocated
This commit is contained in:
parent
0e47754ac8
commit
497ead37bc
58 changed files with 307 additions and 278 deletions
|
@ -50,7 +50,7 @@ ExceptionOr<JS::NonnullGCPtr<Text>> Text::split_text(size_t offset)
|
|||
|
||||
// 2. If offset is greater than length, then throw an "IndexSizeError" DOMException.
|
||||
if (offset > length)
|
||||
return DOM::IndexSizeError::create("Split offset is greater than length");
|
||||
return DOM::IndexSizeError::create(global_object(), "Split offset is greater than length");
|
||||
|
||||
// 3. Let count be length minus offset.
|
||||
auto count = length - offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue