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

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

Issue 1347833002: Ensure functions in FXJS_V8 are prefixed by FXJS_. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nits, format. Created 5 years, 3 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/Document.cpp ('k') | fpdfsdk/src/javascript/JS_Context.cpp » ('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 a0570cb56c61d954080297b1263a226a880c0aab..66a9601cbf27dca62e31a706c8e11c5d2848b494 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -1038,7 +1038,7 @@ FX_BOOL Field::currentValueIndices(IFXJS_Context* cc,
CFX_DWordArray array;
- if (vp.GetType() == VT_number) {
+ if (vp.GetType() == CJS_Value::VT_number) {
int iSelecting = 0;
vp >> iSelecting;
array.Add(iSelecting);
@@ -3316,15 +3316,12 @@ FX_BOOL Field::buttonGetIcon(IFXJS_Context* cc,
ASSERT(pRuntime != NULL);
v8::Local<v8::Object> pObj =
- JS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext,
- JS_GetObjDefnID(pRuntime->GetIsolate(), L"Icon"));
+ FXJS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext,
+ FXJS_GetObjDefnID(pRuntime->GetIsolate(), L"Icon"));
ASSERT(pObj.IsEmpty() == FALSE);
- CJS_Icon* pJS_Icon = (CJS_Icon*)JS_GetPrivate(pObj);
- ASSERT(pJS_Icon != NULL);
-
+ CJS_Icon* pJS_Icon = (CJS_Icon*)FXJS_GetPrivate(pObj);
Icon* pIcon = (Icon*)pJS_Icon->GetEmbedObject();
- ASSERT(pIcon != NULL);
CPDF_Stream* pIconStream = NULL;
if (nface == 0)
@@ -3531,17 +3528,13 @@ FX_BOOL Field::getArray(IFXJS_Context* cc,
for (int j = 0, jsz = swSort.GetSize(); j < jsz; j++) {
CFX_WideString* pStr = swSort.GetAt(j);
- v8::Local<v8::Object> pObj =
- JS_NewFxDynamicObj(pRuntime->GetIsolate(), pContext,
- JS_GetObjDefnID(pRuntime->GetIsolate(), L"Field"));
+ v8::Local<v8::Object> pObj = FXJS_NewFxDynamicObj(
+ pRuntime->GetIsolate(), pContext,
+ FXJS_GetObjDefnID(pRuntime->GetIsolate(), L"Field"));
ASSERT(pObj.IsEmpty() == FALSE);
- CJS_Field* pJSField = (CJS_Field*)JS_GetPrivate(pObj);
- ASSERT(pJSField != NULL);
-
+ CJS_Field* pJSField = (CJS_Field*)FXJS_GetPrivate(pObj);
Field* pField = (Field*)pJSField->GetEmbedObject();
- ASSERT(pField != NULL);
-
pField->AttachField(m_pJSDoc, *pStr);
CJS_Value FormFieldValue(m_isolate);
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | fpdfsdk/src/javascript/JS_Context.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698