Merge to XFA: Fix behaviour of app.alert() with a single object argument.
Original Review URL: https://codereview.chromium.org/1641693003 .
(cherry picked from commit 66519af52b61ca158044651d0507d47efb364f87)
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1639253008 .
diff --git a/fpdfsdk/src/javascript/JS_Value.h b/fpdfsdk/src/javascript/JS_Value.h
index 20a6e38..c33a973 100644
--- a/fpdfsdk/src/javascript/JS_Value.h
+++ b/fpdfsdk/src/javascript/JS_Value.h
@@ -213,4 +213,16 @@
bool JS_PortIsNan(double d);
double JS_LocalTime(double d);
+// Some JS methods have the bizarre convention that they may also be called
+// with a single argument which is an object containing the actual arguments
+// as its properties. The varying arguments to this method are the property
+// names as wchar_t string literals corresponding to each positional argument.
+// The result will always contain |nKeywords| value, with unspecified ones
+// being set to type VT_unknown.
+std::vector<CJS_Value> JS_ExpandKeywordParams(
+ CJS_Runtime* pRuntime,
+ const std::vector<CJS_Value>& originals,
+ size_t nKeywords,
+ ...);
+
#endif // FPDFSDK_SRC_JAVASCRIPT_JS_VALUE_H_