diff options
author | tsepez <tsepez@chromium.org> | 2016-07-15 17:58:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-15 17:58:02 -0700 |
commit | 40faa79da0bc902d7f1f5cc43464b94e6dfa5d22 (patch) | |
tree | 3e6ef034906a3cb46eb833b3e2309b34f7549c1d /fpdfsdk/javascript/JS_Define.h | |
parent | 514e8c914c0e6c2c69167d03786a83b1ebd15d70 (diff) | |
download | pdfium-40faa79da0bc902d7f1f5cc43464b94e6dfa5d22.tar.xz |
Remove type info from CJS_Value, interrogate v8 instead
Review-Url: https://codereview.chromium.org/2154503002
Diffstat (limited to 'fpdfsdk/javascript/JS_Define.h')
-rw-r--r-- | fpdfsdk/javascript/JS_Define.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h index ffef6267c8..6aa1dec768 100644 --- a/fpdfsdk/javascript/JS_Define.h +++ b/fpdfsdk/javascript/JS_Define.h @@ -111,7 +111,7 @@ void JSPropSetter(const char* prop_name_string, CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); C* pObj = reinterpret_cast<C*>(pJSObj->GetEmbedObject()); CFX_WideString sError; - CJS_PropValue propValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); + CJS_PropValue propValue(CJS_Value(pRuntime, value)); propValue.StartSetting(); if (!(pObj->*M)(pContext, propValue, sError)) { FXJS_Error(isolate, JSFormatErrorString(class_name_string, prop_name_string, @@ -149,7 +149,7 @@ void JSMethod(const char* method_name_string, IJS_Context* pContext = pRuntime->GetCurrentContext(); std::vector<CJS_Value> parameters; for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { - parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); + parameters.push_back(CJS_Value(pRuntime, info[i])); } CJS_Value valueRes(pRuntime); CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder()); @@ -404,7 +404,7 @@ void JSSpecialPropPut(const char* class_name, CFX_WideString propname = CFX_WideString::FromUTF8( CFX_ByteStringC(*utf8_value, utf8_value.length())); CFX_WideString sError; - CJS_PropValue PropValue(CJS_Value(pRuntime, value, CJS_Value::VT_unknown)); + CJS_PropValue PropValue(CJS_Value(pRuntime, value)); PropValue.StartSetting(); if (!pObj->DoProperty(pContext, propname.c_str(), PropValue, sError)) { FXJS_Error(isolate, JSFormatErrorString(class_name, "PutProperty", sError)); @@ -447,7 +447,7 @@ void JSGlobalFunc(const char* func_name_string, IJS_Context* pContext = pRuntime->GetCurrentContext(); std::vector<CJS_Value> parameters; for (unsigned int i = 0; i < (unsigned int)info.Length(); i++) { - parameters.push_back(CJS_Value(pRuntime, info[i], CJS_Value::VT_unknown)); + parameters.push_back(CJS_Value(pRuntime, info[i])); } CJS_Value valueRes(pRuntime); CFX_WideString sError; @@ -485,6 +485,4 @@ void JSGlobalFunc(const char* func_name_string, } \ } -CJS_Value::Type GET_VALUE_TYPE(v8::Local<v8::Value> p); - #endif // FPDFSDK_JAVASCRIPT_JS_DEFINE_H_ |