From 5c4dd35a1ea2ba25839c8dabb4388a5dfc811165 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 26 May 2016 13:57:58 -0700 Subject: 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 --- xfa/fxfa/fm2js/xfa_fm2jscontext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.cpp') 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); -- cgit v1.2.3