From 5ad45e2f68bb796c562302e9fc2d963c279334c7 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 10 May 2018 20:26:35 +0000 Subject: Cleanup formcalc method generation This CL simplifies the FormCalc method call generation when converted to JavaScript. Currently we output the same chunk of code to run the given method on an array or object per method call. This CL pulls out the common execution code to a pfm_method_runner function which is used instead. An embedder test has been added to verify that method invocation from formcalc works correctly. Bug: chromium:814848 Change-Id: I1ec052eab051053fedcb464d57e0e15228b8c5a2 Reviewed-on: https://pdfium-review.googlesource.com/32372 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- testing/xfa_js_embedder_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testing/xfa_js_embedder_test.cpp') diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp index fe54621a2b..97009f34c2 100644 --- a/testing/xfa_js_embedder_test.cpp +++ b/testing/xfa_js_embedder_test.cpp @@ -76,7 +76,7 @@ bool XFAJSEmbedderTest::Execute(const ByteStringView& input) { CFXJSE_Value msg(GetIsolate()); value_->GetObjectPropertyByIdx(1, &msg); - fprintf(stderr, "JS: %.*s\n", static_cast(input.GetLength()), + fprintf(stderr, "FormCalc: %.*s\n", static_cast(input.GetLength()), input.unterminated_c_str()); // If the parsing of the input fails, then v8 will not run, so there will be // no value here to print. -- cgit v1.2.3