mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibJS: Allow JS::make_handle(T*) to be called with nullptr
Instead of asserting, just return an empty Handle.
This commit is contained in:
parent
d98f12b928
commit
7047a5ca59
Notes:
sideshowbarker
2024-07-17 16:23:55 +09:00
Author: https://github.com/awesomekling
Commit: 7047a5ca59
1 changed files with 2 additions and 0 deletions
|
@ -70,6 +70,8 @@ private:
|
|||
template<class T>
|
||||
inline Handle<T> make_handle(T* cell)
|
||||
{
|
||||
if (!cell)
|
||||
return Handle<T> {};
|
||||
return Handle<T>::create(cell);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue