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

Side by Side Diff: fpdfsdk/src/fpdfview.cpp

Issue 1652873003: Pdfium does not create isolate when it runs in chromium (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
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 | « fpdfsdk/include/fpdfxfa/fpdfxfa_app.h ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "public/fpdfview.h" 7 #include "public/fpdfview.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 CFX_GEModule::Create(cfg ? cfg->m_pUserFontPaths : nullptr); 235 CFX_GEModule::Create(cfg ? cfg->m_pUserFontPaths : nullptr);
236 CFX_GEModule::Get()->SetCodecModule(g_pCodecModule); 236 CFX_GEModule::Get()->SetCodecModule(g_pCodecModule);
237 237
238 CPDF_ModuleMgr::Create(); 238 CPDF_ModuleMgr::Create();
239 CPDF_ModuleMgr* pModuleMgr = CPDF_ModuleMgr::Get(); 239 CPDF_ModuleMgr* pModuleMgr = CPDF_ModuleMgr::Get();
240 pModuleMgr->SetCodecModule(g_pCodecModule); 240 pModuleMgr->SetCodecModule(g_pCodecModule);
241 pModuleMgr->InitPageModule(); 241 pModuleMgr->InitPageModule();
242 pModuleMgr->InitRenderModule(); 242 pModuleMgr->InitRenderModule();
243 #ifdef PDF_ENABLE_XFA 243 #ifdef PDF_ENABLE_XFA
244 CPDFXFA_App::GetInstance()->Initialize(); 244 CPDFXFA_App::GetInstance()->Initialize(
245 (cfg && cfg->version >= 2)
246 ? reinterpret_cast<FXJSE_HRUNTIME>(cfg->m_pIsolate)
247 : nullptr);
245 #else // PDF_ENABLE_XFA 248 #else // PDF_ENABLE_XFA
246 pModuleMgr->LoadEmbeddedGB1CMaps(); 249 pModuleMgr->LoadEmbeddedGB1CMaps();
247 pModuleMgr->LoadEmbeddedJapan1CMaps(); 250 pModuleMgr->LoadEmbeddedJapan1CMaps();
248 pModuleMgr->LoadEmbeddedCNS1CMaps(); 251 pModuleMgr->LoadEmbeddedCNS1CMaps();
249 pModuleMgr->LoadEmbeddedKorea1CMaps(); 252 pModuleMgr->LoadEmbeddedKorea1CMaps();
250 #endif // PDF_ENABLE_XFA 253 #endif // PDF_ENABLE_XFA
251 if (cfg && cfg->version >= 2) 254 if (cfg && cfg->version >= 2)
252 IJS_Runtime::Initialize(cfg->m_v8EmbedderSlot, cfg->m_pIsolate); 255 IJS_Runtime::Initialize(cfg->m_v8EmbedderSlot, cfg->m_pIsolate);
253 } 256 }
254 257
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 if (!buffer) { 1196 if (!buffer) {
1194 *buflen = len; 1197 *buflen = len;
1195 } else if (*buflen >= len) { 1198 } else if (*buflen >= len) {
1196 memcpy(buffer, utf16Name.c_str(), len); 1199 memcpy(buffer, utf16Name.c_str(), len);
1197 *buflen = len; 1200 *buflen = len;
1198 } else { 1201 } else {
1199 *buflen = -1; 1202 *buflen = -1;
1200 } 1203 }
1201 return (FPDF_DEST)pDestObj; 1204 return (FPDF_DEST)pDestObj;
1202 } 1205 }
OLDNEW
« no previous file with comments | « fpdfsdk/include/fpdfxfa/fpdfxfa_app.h ('k') | fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698