Add m_pDocument in CPDF_Color and check if page date has been forced clear
authorBo Xu <bo_xu@foxitsoftware.com>
Tue, 2 Sep 2014 19:13:36 +0000 (12:13 -0700)
committerBo Xu <bo_xu@foxitsoftware.com>
Tue, 2 Sep 2014 19:13:36 +0000 (12:13 -0700)
commit1d7dc1baba517bbf862e7d144e121b2ea4ffd33b
tree8b701fcb0b798a193475ac9aa64b6acdb55b81ef
parent49c41ac846ed685439b3b5ea9c9037bf4bba2365
Add m_pDocument in CPDF_Color and check if page date has been forced clear

This will prevent using freed pattern object.
This is a better solution than https://pdfium.googlesource.com/pdfium/+/1b9c5c4dc41956b8c5ab17b9a882adf8a2513768
and in essence revert that patch

BUG=409373
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/522483003
core/include/fpdfapi/fpdf_resource.h
core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp