summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Field.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript/Field.cpp')
-rw-r--r--fpdfsdk/src/javascript/Field.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 2a631dce39..59e3108050 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -3310,9 +3310,8 @@ FX_BOOL Field::buttonGetIcon(IFXJS_Context* cc,
CJS_Context* pContext = (CJS_Context*)cc;
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
- v8::Local<v8::Object> pObj =
- FXJS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext,
- FXJS_GetObjDefnID(pRuntime->GetIsolate(), L"Icon"));
+ v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj(
+ pRuntime->GetIsolate(), pContext, CJS_Icon::g_nObjDefnID);
ASSERT(pObj.IsEmpty() == FALSE);
CJS_Icon* pJS_Icon = (CJS_Icon*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj);
@@ -3521,9 +3520,8 @@ FX_BOOL Field::getArray(IFXJS_Context* cc,
for (int j = 0, jsz = swSort.GetSize(); j < jsz; j++) {
nonstd::unique_ptr<CFX_WideString> pStr(swSort.GetAt(j));
v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj(
- pRuntime->GetIsolate(), pContext,
- FXJS_GetObjDefnID(pRuntime->GetIsolate(), L"Field"));
- ASSERT(pObj.IsEmpty() == FALSE);
+ pRuntime->GetIsolate(), pContext, CJS_Field::g_nObjDefnID);
+ ASSERT(!pObj.IsEmpty());
CJS_Field* pJSField =
(CJS_Field*)FXJS_GetPrivate(pRuntime->GetIsolate(), pObj);