mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
LibPDF: Harden the document/parser against errors
This commit is contained in:
parent
d654fe0e41
commit
1ef5071d1b
6 changed files with 217 additions and 108 deletions
|
@ -61,6 +61,16 @@ public:
|
|||
m_as_ref = (generation_index << 14) | index;
|
||||
}
|
||||
|
||||
template<IsObject T>
|
||||
Value(RefPtr<T> obj)
|
||||
: m_type(obj ? Type::Object : Type::Empty)
|
||||
{
|
||||
if (obj) {
|
||||
obj->ref();
|
||||
m_as_object = obj;
|
||||
}
|
||||
}
|
||||
|
||||
template<IsObject T>
|
||||
Value(NonnullRefPtr<T> obj)
|
||||
: m_type(Type::Object)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue