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

Side by Side Diff: pdf/pdfium/pdfium_engine.cc

Issue 1723003002: Tear down v8 after pdf library is released (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "pdf/pdfium/pdfium_engine.h" 5 #include "pdf/pdfium/pdfium_engine.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // Font loading doesn't work in the renderer sandbox in Linux. 511 // Font loading doesn't work in the renderer sandbox in Linux.
512 FPDF_SetSystemFontInfo(&g_font_info); 512 FPDF_SetSystemFontInfo(&g_font_info);
513 #endif 513 #endif
514 514
515 FSDK_SetUnSpObjProcessHandler(&g_unsupported_info); 515 FSDK_SetUnSpObjProcessHandler(&g_unsupported_info);
516 516
517 return true; 517 return true;
518 } 518 }
519 519
520 void ShutdownSDK() { 520 void ShutdownSDK() {
521 FPDF_DestroyLibrary();
521 TearDownV8(); 522 TearDownV8();
522 FPDF_DestroyLibrary();
523 } 523 }
524 524
525 PDFEngine* PDFEngine::Create(PDFEngine::Client* client) { 525 PDFEngine* PDFEngine::Create(PDFEngine::Client* client) {
526 return new PDFiumEngine(client); 526 return new PDFiumEngine(client);
527 } 527 }
528 528
529 PDFiumEngine::PDFiumEngine(PDFEngine::Client* client) 529 PDFiumEngine::PDFiumEngine(PDFEngine::Client* client)
530 : client_(client), 530 : client_(client),
531 current_zoom_(1.0), 531 current_zoom_(1.0),
532 current_rotation_(0), 532 current_rotation_(0),
(...skipping 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after
3873 FPDF_DOCUMENT doc = 3873 FPDF_DOCUMENT doc =
3874 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr); 3874 FPDF_LoadMemDocument(pdf_buffer, pdf_buffer_size, nullptr);
3875 if (!doc) 3875 if (!doc)
3876 return false; 3876 return false;
3877 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0; 3877 bool success = FPDF_GetPageSizeByIndex(doc, page_number, width, height) != 0;
3878 FPDF_CloseDocument(doc); 3878 FPDF_CloseDocument(doc);
3879 return success; 3879 return success;
3880 } 3880 }
3881 3881
3882 } // namespace chrome_pdf 3882 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698