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

Unified Diff: fpdfsdk/javascript/JS_Define.h

Issue 2154503002: Remove type info from CJS_Value, interrogate v8 instead (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: nit Created 4 years, 5 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/javascript/Document.cpp ('k') | fpdfsdk/javascript/JS_Value.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_Define.h
diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h
index ffef6267c8ce94e3766b0ff0bc85d4e009d0cf2b..6aa1dec768e89cf77d4e37c2c2a8c8778663bee1 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_
« no previous file with comments | « fpdfsdk/javascript/Document.cpp ('k') | fpdfsdk/javascript/JS_Value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698