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

Unified Diff: fpdfsdk/javascript/cjs_context.cpp

Issue 2245863002: Push v8::Isolate into CFXJS_Engine class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Null isolate before letting CFXJS_Engine dtor invoked Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/javascript/app.cpp ('k') | fpdfsdk/javascript/cjs_runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/cjs_context.cpp
diff --git a/fpdfsdk/javascript/cjs_context.cpp b/fpdfsdk/javascript/cjs_context.cpp
index 06abf7f48d27db5c49a576bc6bcac6e3d25855a8..c37fdab738a0ff2dbf8e19e69c547de35151b09b 100644
--- a/fpdfsdk/javascript/cjs_context.cpp
+++ b/fpdfsdk/javascript/cjs_context.cpp
@@ -29,7 +29,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
CFX_WideString* info) {
v8::Isolate::Scope isolate_scope(m_pRuntime->GetIsolate());
v8::HandleScope handle_scope(m_pRuntime->GetIsolate());
- v8::Local<v8::Context> context = m_pRuntime->NewJSContext();
+ v8::Local<v8::Context> context = m_pRuntime->NewLocalContext();
v8::Context::Scope context_scope(context);
if (m_bBusy) {
@@ -49,7 +49,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script,
CFX_WideString sErrorMessage;
int nRet = 0;
if (script.GetLength() > 0) {
- nRet = m_pRuntime->Execute(script.c_str(), &sErrorMessage);
+ nRet = m_pRuntime->ExecuteScript(script.c_str(), &sErrorMessage);
}
if (nRet < 0) {
« no previous file with comments | « fpdfsdk/javascript/app.cpp ('k') | fpdfsdk/javascript/cjs_runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698