diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-06 11:45:28 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-06 11:45:28 -0700 |
commit | cd56a7d6fb05bd0babf316a84280a26ecc649d45 (patch) | |
tree | 65a4ff0aa976f364e46d1ec69ebbe34ddbc99e90 /fpdfsdk/src/javascript/Field.cpp | |
parent | 3745841a4c4ab915c98865c1dd71f9debc3e2f99 (diff) | |
download | pdfium-cd56a7d6fb05bd0babf316a84280a26ecc649d45.tar.xz |
Merge to XFA: Store object definition ID in each js_class.
Manual edits in JS_Define.h.
(cherry picked from commit f0a5b2803c09f3605dcd606e764ef604f0d2a8ea)
Original Review URL: https://codereview.chromium.org/1382263002 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1382683008 .
Diffstat (limited to 'fpdfsdk/src/javascript/Field.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/Field.cpp | 10 |
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); |