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

Unified Diff: pdf/pdf.cc

Issue 1419793008: Setup and tear down V8 if the PDF module is not managed via pepper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 1 month 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 | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdf.cc
diff --git a/pdf/pdf.cc b/pdf/pdf.cc
index 1f580e4f1532a7d543314d2e3f1f87f0d1851f30..9521fdfa4446202f384a5556e3189a86ec3f926e 100644
--- a/pdf/pdf.cc
+++ b/pdf/pdf.cc
@@ -10,8 +10,6 @@
#include "base/command_line.h"
#include "base/logging.h"
-#include "gin/array_buffer.h"
-#include "gin/public/isolate_holder.h"
#include "pdf/out_of_process_instance.h"
#include "ppapi/c/ppp.h"
#include "ppapi/cpp/private/internal_module.h"
@@ -24,14 +22,6 @@ namespace {
bool g_sdk_initialized_via_pepper = false;
-gin::IsolateHolder* g_isolate_holder = nullptr;
-
-void TearDownV8() {
- g_isolate_holder->isolate()->Exit();
- delete g_isolate_holder;
- g_isolate_holder = nullptr;
-}
-
} // namespace
PDFModule::PDFModule() {
@@ -39,7 +29,6 @@ PDFModule::PDFModule() {
PDFModule::~PDFModule() {
if (g_sdk_initialized_via_pepper) {
- TearDownV8();
chrome_pdf::ShutdownSDK();
g_sdk_initialized_via_pepper = false;
}
@@ -60,15 +49,8 @@ pp::Instance* PDFModule::CreateInstance(PP_Instance instance) {
v8::V8::SetNativesDataBlob(&natives);
v8::V8::SetSnapshotDataBlob(&snapshot);
}
- gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode,
- gin::ArrayBufferAllocator::SharedInstance());
- g_isolate_holder =
- new gin::IsolateHolder(gin::IsolateHolder::kSingleThread);
- g_isolate_holder->isolate()->Enter();
- if (!chrome_pdf::InitializeSDK()) {
- TearDownV8();
+ if (!chrome_pdf::InitializeSDK())
return NULL;
- }
g_sdk_initialized_via_pepper = true;
}
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | pdf/pdfium/pdfium_engine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698