summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-30 10:45:06 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-30 10:45:06 -0700
commitcd5bca472261cebc60b37d7bbc8b81b4091a6cd6 (patch)
treebe1e582a4a834c3f1f2ee2e4f9724ee488935b0c /fpdfsdk
parent43c8a6adc0045c974fb1c831deeef53fa5a38a82 (diff)
downloadpdfium-cd5bca472261cebc60b37d7bbc8b81b4091a6cd6.tar.xz
Fix build of pdf_hint_table_fuzzer.chromium/2877
Restore CPDF_Dictionary default constructor. Use it in places where reasonable in the code. TBR=dsinclair@chromium.org TBR=thestig@chromium.org Review-Url: https://codereview.chromium.org/2383843002
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfdoc_unittest.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp
index e39b732272..70d136b890 100644
--- a/fpdfsdk/fpdfdoc_unittest.cpp
+++ b/fpdfsdk/fpdfdoc_unittest.cpp
@@ -64,7 +64,7 @@ class PDFDocTest : public testing::Test {
m_pDoc = WrapUnique(new CPDF_TestPdfDocument());
m_pIndirectObjs = m_pDoc->GetHolder();
// Setup the root directory.
- m_pRootObj.reset(new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>()));
+ m_pRootObj.reset(new CPDF_Dictionary());
m_pDoc->SetRoot(m_pRootObj.get());
}
@@ -79,8 +79,7 @@ class PDFDocTest : public testing::Test {
std::vector<DictObjInfo> info;
for (int i = 0; i < num; ++i) {
// Objects created will be released by the document.
- CPDF_Dictionary* obj(
- new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>()));
+ CPDF_Dictionary* obj = new CPDF_Dictionary();
info.push_back({m_pIndirectObjs->AddIndirectObject(obj), obj});
}
return info;
@@ -104,8 +103,7 @@ TEST_F(PDFDocTest, FindBookmark) {
}
{
// Empty bookmark tree.
- m_pRootObj->SetFor("Outlines",
- new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>()));
+ m_pRootObj->SetFor("Outlines", new CPDF_Dictionary());
std::unique_ptr<unsigned short, pdfium::FreeDeleter> title =
GetFPDFWideString(L"");
EXPECT_EQ(nullptr, FPDFBookmark_Find(m_pDoc.get(), title.get()));