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

Unified Diff: fpdfsdk/javascript/JS_EventHandler.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/JS_Define.h ('k') | fpdfsdk/javascript/JS_Object.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_EventHandler.cpp
diff --git a/fpdfsdk/javascript/JS_EventHandler.cpp b/fpdfsdk/javascript/JS_EventHandler.cpp
index 8dc1b8270c5865dbcd53d65a6636dd7dbc0625fc..fe9a909dc94cc11a9bb9fbd3d59575d4b3768d0f 100644
--- a/fpdfsdk/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/javascript/JS_EventHandler.cpp
@@ -595,22 +595,22 @@ FX_BOOL CJS_EventHandler::Shift() {
Field* CJS_EventHandler::Source() {
CJS_Runtime* pRuntime = m_pJSContext->GetJSRuntime();
- v8::Local<v8::Object> pDocObj = FXJS_NewFxDynamicObj(
- pRuntime->GetIsolate(), pRuntime, CJS_Document::g_nObjDefnID);
+ v8::Local<v8::Object> pDocObj =
+ pRuntime->NewFxDynamicObj(CJS_Document::g_nObjDefnID);
ASSERT(!pDocObj.IsEmpty());
- v8::Local<v8::Object> pFieldObj = FXJS_NewFxDynamicObj(
- pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID);
+ v8::Local<v8::Object> pFieldObj =
+ pRuntime->NewFxDynamicObj(CJS_Field::g_nObjDefnID);
ASSERT(!pFieldObj.IsEmpty());
CJS_Document* pJSDocument =
- (CJS_Document*)FXJS_GetPrivate(pRuntime->GetIsolate(), pDocObj);
+ static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
Document* pDocument = (Document*)pJSDocument->GetEmbedObject();
pDocument->AttachDoc(m_pTargetDoc ? m_pTargetDoc
: m_pJSContext->GetReaderDocument());
CJS_Field* pJSField =
- (CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pFieldObj);
+ static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));
Field* pField = (Field*)pJSField->GetEmbedObject();
pField->AttachField(pDocument, m_strSourceName);
return pField;
@@ -618,22 +618,22 @@ Field* CJS_EventHandler::Source() {
Field* CJS_EventHandler::Target_Field() {
CJS_Runtime* pRuntime = m_pJSContext->GetJSRuntime();
- v8::Local<v8::Object> pDocObj = FXJS_NewFxDynamicObj(
- pRuntime->GetIsolate(), pRuntime, CJS_Document::g_nObjDefnID);
+ v8::Local<v8::Object> pDocObj =
+ pRuntime->NewFxDynamicObj(CJS_Document::g_nObjDefnID);
ASSERT(!pDocObj.IsEmpty());
- v8::Local<v8::Object> pFieldObj = FXJS_NewFxDynamicObj(
- pRuntime->GetIsolate(), pRuntime, CJS_Field::g_nObjDefnID);
+ v8::Local<v8::Object> pFieldObj =
+ pRuntime->NewFxDynamicObj(CJS_Field::g_nObjDefnID);
ASSERT(!pFieldObj.IsEmpty());
CJS_Document* pJSDocument =
- (CJS_Document*)FXJS_GetPrivate(pRuntime->GetIsolate(), pDocObj);
+ static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
Document* pDocument = (Document*)pJSDocument->GetEmbedObject();
pDocument->AttachDoc(m_pTargetDoc ? m_pTargetDoc
: m_pJSContext->GetReaderDocument());
CJS_Field* pJSField =
- (CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pFieldObj);
+ static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));
Field* pField = (Field*)pJSField->GetEmbedObject();
pField->AttachField(pDocument, m_strTargetName);
return pField;
« no previous file with comments | « fpdfsdk/javascript/JS_Define.h ('k') | fpdfsdk/javascript/JS_Object.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698