| Index: fpdfsdk/javascript/Document.cpp
|
| diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
|
| index 258dddbe108a07c336a4583290f69ccbc36f7933..7265a1c06ef44489312199dc5e1534e33bdfb236 100644
|
| --- a/fpdfsdk/javascript/Document.cpp
|
| +++ b/fpdfsdk/javascript/Document.cpp
|
| @@ -411,9 +411,8 @@ FX_BOOL Document::print(IJS_Context* cc,
|
|
|
| int nlength = params.size();
|
| if (nlength == 9) {
|
| - if (params[8].GetType() == CJS_Value::VT_fxobject) {
|
| + if (params[8].GetType() == CJS_Value::VT_object) {
|
| v8::Local<v8::Object> pObj = params[8].ToV8Object();
|
| - {
|
| if (FXJS_GetObjDefnID(pObj) == CJS_PrintParamsObj::g_nObjDefnID) {
|
| if (CJS_Object* pJSObj = params[8].ToCJSObject()) {
|
| if (PrintParamsObj* pprintparamsObj =
|
| @@ -428,7 +427,6 @@ FX_BOOL Document::print(IJS_Context* cc,
|
| bAnnotations = pprintparamsObj->bAnnotations;
|
| }
|
| }
|
| - }
|
| }
|
| }
|
| } else {
|
| @@ -592,18 +590,16 @@ FX_BOOL Document::submitForm(IJS_Context* cc,
|
| v8::Local<v8::Object> pObj = params[0].ToV8Object();
|
| v8::Local<v8::Value> pValue = FXJS_GetObjectElement(isolate, pObj, L"cURL");
|
| if (!pValue.IsEmpty())
|
| - strURL =
|
| - CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
|
| + strURL = CJS_Value(pRuntime, pValue).ToCFXWideString();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"bFDF");
|
| - bFDF = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool();
|
| + bFDF = CJS_Value(pRuntime, pValue).ToBool();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"bEmpty");
|
| - bEmpty = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToBool();
|
| + bEmpty = CJS_Value(pRuntime, pValue).ToBool();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"aFields");
|
| - aFields.Attach(
|
| - CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToV8Array());
|
| + aFields.Attach(CJS_Value(pRuntime, pValue).ToV8Array());
|
| }
|
|
|
| CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
|
| @@ -686,25 +682,22 @@ FX_BOOL Document::mailDoc(IJS_Context* cc,
|
| v8::Local<v8::Object> pObj = params[0].ToV8Object();
|
|
|
| v8::Local<v8::Value> pValue = FXJS_GetObjectElement(isolate, pObj, L"bUI");
|
| - bUI = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToInt();
|
| + bUI = CJS_Value(pRuntime, pValue).ToInt();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"cTo");
|
| - cTo = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
|
| + cTo = CJS_Value(pRuntime, pValue).ToCFXWideString();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"cCc");
|
| - cCc = CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
|
| + cCc = CJS_Value(pRuntime, pValue).ToCFXWideString();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"cBcc");
|
| - cBcc =
|
| - CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
|
| + cBcc = CJS_Value(pRuntime, pValue).ToCFXWideString();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"cSubject");
|
| - cSubject =
|
| - CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
|
| + cSubject = CJS_Value(pRuntime, pValue).ToCFXWideString();
|
|
|
| pValue = FXJS_GetObjectElement(isolate, pObj, L"cMsg");
|
| - cMsg =
|
| - CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToCFXWideString();
|
| + cMsg = CJS_Value(pRuntime, pValue).ToCFXWideString();
|
| }
|
|
|
| pRuntime->BeginBlock();
|
|
|