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

Unified Diff: fpdfsdk/src/javascript/Field.cpp

Issue 1382263002: Store object definition ID in each js_class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use size_t vars with FX_ArraySize. Created 5 years, 2 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/src/javascript/Field.h ('k') | fpdfsdk/src/javascript/Icon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/Field.cpp
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 7026530d72244cdbfa6e293daf0ed9f419fdba6e..973d912273d300b277fd96d3e81811062214b01c 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);
« no previous file with comments | « fpdfsdk/src/javascript/Field.h ('k') | fpdfsdk/src/javascript/Icon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698