Chromium Code Reviews| Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp |
| diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp |
| index 2d9df06f679237e8d7edee13b7b13b9e77151dd7..7858eae057d53cce61bd342eb4477fa1e556e4e9 100644 |
| --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp |
| +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp |
| @@ -161,7 +161,7 @@ CPDF_Array* CPDF_Object::GetArray() const { |
| return const_cast<CPDF_Array*>(AsArray()); |
| } |
| void CPDF_Object::SetString(const CFX_ByteString& str) { |
| - ASSERT(this != NULL); |
| + ASSERT(this); |
|
Tom Sepez
2015/12/14 19:14:07
Uh, no.
Lei Zhang
2015/12/15 01:38:32
Done.
|
| switch (m_Type) { |
| case PDFOBJ_BOOLEAN: |
| AsBoolean()->m_bValue = (str == "true"); |
| @@ -526,17 +526,15 @@ void CPDF_Array::SetAt(FX_DWORD i, |
| void CPDF_Array::InsertAt(FX_DWORD index, |
| CPDF_Object* pObj, |
| CPDF_IndirectObjects* pObjs) { |
| - ASSERT(pObj != NULL); |
| if (pObj->GetObjNum()) { |
| - ASSERT(pObjs != NULL); |
| + ASSERT(pObjs); |
|
Tom Sepez
2015/12/14 19:14:08
Probably segvs under next line? Or is it special
Lei Zhang
2015/12/15 01:38:32
The next line dereferences |pObj| but not |pObjs|.
|
| pObj = new CPDF_Reference(pObjs, pObj->GetObjNum()); |
| } |
| m_Objects.InsertAt(index, pObj); |
| } |
| void CPDF_Array::Add(CPDF_Object* pObj, CPDF_IndirectObjects* pObjs) { |
| - ASSERT(pObj != NULL); |
| if (pObj->GetObjNum()) { |
| - ASSERT(pObjs != NULL); |
| + ASSERT(pObjs); |
|
Tom Sepez
2015/12/14 19:14:07
and here.
Lei Zhang
2015/12/15 01:38:32
Same as above.
|
| pObj = new CPDF_Reference(pObjs, pObj->GetObjNum()); |
| } |
| m_Objects.Add(pObj); |