0

Partial revert of r759471: Reduce / fix ScopedUnsupportedFeature usage

ClusterFuzz figured out why PDFiumPage::GetPage() needs to have a
ScopedUnsupportedFeature.

Bug: 1077080
Change-Id: I7d6dc9bc27775408d2fa7ebb549c60e8749b9a21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174985
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#764476}
This commit is contained in:
Lei Zhang
2020-04-30 23:29:00 +00:00
committed by Commit Bot
parent 450eb78194
commit 0ec0a16ace

@ -21,6 +21,7 @@
#include "base/strings/utf_string_conversions.h"
#include "pdf/pdfium/pdfium_api_string_buffer_adapter.h"
#include "pdf/pdfium/pdfium_engine.h"
#include "pdf/pdfium/pdfium_unsupported_features.h"
#include "ppapi/c/private/ppb_pdf.h"
#include "printing/units.h"
#include "third_party/pdfium/public/cpp/fpdf_scopers.h"
@ -300,6 +301,7 @@ void PDFiumPage::Unload() {
}
FPDF_PAGE PDFiumPage::GetPage() {
ScopedUnsupportedFeature scoped_unsupported_feature(engine_);
if (!available_)
return nullptr;
if (!page_) {