summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-11 18:14:56 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-11 18:14:56 -0700
commit822484b5f88d92dbcd567b1c2da38af1e720b56f (patch)
treede1902c744cbe38023432cc3f860d99df90beb70 /core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
parente09c1e4db92e28a332f55aa3c80ceb44f4b74287 (diff)
downloadpdfium-822484b5f88d92dbcd567b1c2da38af1e720b56f.tar.xz
Remove CPDF_Object::GetConstString and overrides
GetConstString() has sharp edges in that when applied to a CPDF_Number, it must return null whereas GetString() returns a the stringified number, because of the inability to control the lifetime of the underlying allocated string. Deleting this method showed several places where we actually wanted a *String, not a *StringC, so we were re-allocating a string we already had. Review URL: https://codereview.chromium.org/1879683002
Diffstat (limited to 'core/fpdfapi/fpdf_page/fpdf_page_doc.cpp')
-rw-r--r--core/fpdfapi/fpdf_page/fpdf_page_doc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 2dfccb26d7..6cd66185c6 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -326,7 +326,7 @@ CPDF_ColorSpace* CPDF_DocPageData::GetColorSpace(
return nullptr;
if (pCSObj->IsName()) {
- CFX_ByteString name = pCSObj->GetConstString();
+ CFX_ByteString name = pCSObj->GetString();
CPDF_ColorSpace* pCS = CPDF_ColorSpace::ColorspaceFromName(name);
if (!pCS && pResources) {
CPDF_Dictionary* pList = pResources->GetDictBy("ColorSpace");