Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 803733002: Roll PDFium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pdf/pdf_engine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 213214f5311a35a1064722d5b26b97cb7d3cb06c..8c49b9dc0bc67a56ed1bb3732a394ae62ec88ccb 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -36,7 +36,6 @@
#include "third_party/pdfium/fpdfsdk/include/fpdf_sysfontinfo.h"
#include "third_party/pdfium/fpdfsdk/include/fpdf_transformpage.h"
#include "third_party/pdfium/fpdfsdk/include/fpdfedit.h"
-#include "third_party/pdfium/fpdfsdk/include/fpdfoom.h"
#include "third_party/pdfium/fpdfsdk/include/fpdfppo.h"
#include "third_party/pdfium/fpdfsdk/include/fpdfsave.h"
#include "third_party/pdfium/fpdfsdk/include/pdfwindow/PDFWindow.h"
@@ -290,19 +289,6 @@ FPDF_SYSFONTINFO g_font_info = {
};
#endif // defined(OS_LINUX)
-void OOM_Handler(_OOM_INFO*) {
- // Kill the process. This is important for security, since the code doesn't
- // NULL-check many memory allocations. If a malloc fails, returns NULL, and
- // the buffer is then used, it provides a handy mapping of memory starting at
- // address 0 for an attacker to utilize.
- abort();
-}
-
-OOM_INFO g_oom_info = {
- 1,
- OOM_Handler
-};
-
PDFiumEngine* g_engine_for_unsupported;
void Unsupported_Handler(UNSUPPORT_INFO*, int type) {
@@ -529,15 +515,14 @@ void FormatStringForOS(base::string16* text) {
} // namespace
-bool InitializeSDK(void* data) {
- FPDF_InitLibrary(data);
+bool InitializeSDK() {
+ FPDF_InitLibrary();
#if defined(OS_LINUX)
// Font loading doesn't work in the renderer sandbox in Linux.
FPDF_SetSystemFontInfo(&g_font_info);
#endif
- FSDK_SetOOMHandler(&g_oom_info);
FSDK_SetUnSpObjProcessHandler(&g_unsuppored_info);
return true;
« no previous file with comments | « pdf/pdf_engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698