diff options
author | tsepez <tsepez@chromium.org> | 2016-05-26 13:57:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-26 13:57:58 -0700 |
commit | 5c4dd35a1ea2ba25839c8dabb4388a5dfc811165 (patch) | |
tree | e5caf9f0b3f6c2a57f31edbc55fc2cb88673e524 /xfa/fxfa/fm2js | |
parent | 1c9cfe10e81eebf6fcdd676e656eb8ab35bee961 (diff) | |
download | pdfium-5c4dd35a1ea2ba25839c8dabb4388a5dfc811165.tar.xz |
Make additional FXJSE_CLASS_DESCRIPTORS constant
Also, no need to track these in the contexts since they are global.
Review-Url: https://codereview.chromium.org/2014363002
Diffstat (limited to 'xfa/fxfa/fm2js')
-rw-r--r-- | xfa/fxfa/fm2js/xfa_fm2jscontext.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/fm2js/xfa_fm2jscontext.h | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp index 79df225807..40d8bcf5f4 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp @@ -7183,7 +7183,7 @@ void CXFA_FM2JSContext::ValueToUTF8String(CFXJSE_Value* arg, } CXFA_FM2JSContext::CXFA_FM2JSContext() - : m_pClassDescriptor(nullptr), m_pFMClass(nullptr), m_pDocument(nullptr) {} + : m_pFMClass(nullptr), m_pDocument(nullptr) {} CXFA_FM2JSContext::~CXFA_FM2JSContext() { if (m_pValue) @@ -7195,8 +7195,7 @@ void CXFA_FM2JSContext::Initialize(v8::Isolate* pScriptIsolate, CXFA_Document* pDoc) { m_pDocument = pDoc; m_pIsolate = pScriptIsolate; - m_pClassDescriptor = &formcalc_fm2js_descriptor; - m_pFMClass = FXJSE_DefineClass(pScriptContext, m_pClassDescriptor); + m_pFMClass = FXJSE_DefineClass(pScriptContext, &formcalc_fm2js_descriptor); m_pValue = FXJSE_Value_Create(pScriptIsolate); FXJSE_Value_SetNull(m_pValue); FXJSE_Value_SetObject(m_pValue, this, m_pFMClass); @@ -7205,6 +7204,7 @@ void CXFA_FM2JSContext::Initialize(v8::Isolate* pScriptIsolate, void CXFA_FM2JSContext::GlobalPropertyGetter(CFXJSE_Value* pValue) { FXJSE_Value_Set(pValue, m_pValue); } + void CXFA_FM2JSContext::ThrowScriptErrorMessage(int32_t iStringID, ...) { IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider(); ASSERT(pAppProvider); diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h index 74fe106e3f..2994aad1b6 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h @@ -447,7 +447,6 @@ class CXFA_FM2JSContext { private: v8::Isolate* m_pIsolate; - const FXJSE_CLASS_DESCRIPTOR* m_pClassDescriptor; CFXJSE_Class* m_pFMClass; CFXJSE_Value* m_pValue; CXFA_Document* m_pDocument; |