From be0f656a8e61336cbe0089904c9bfb6e23521bce Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Fri, 25 May 2018 14:41:33 +0000 Subject: Add code to display XFA JS log messages This CL adds a bit of commented out code to CJX_LogPseudoModel to dump any xfa.log.message() commands to the terminal. It's commented out as we don't want it running normally but we can enable as needed. Change-Id: Ia53759253391cbaa249a1801aa1541213020ad68 Reviewed-on: https://pdfium-review.googlesource.com/32915 Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- fxjs/xfa/cjx_logpseudomodel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fxjs') diff --git a/fxjs/xfa/cjx_logpseudomodel.cpp b/fxjs/xfa/cjx_logpseudomodel.cpp index 446c937fc3..18093f5263 100644 --- a/fxjs/xfa/cjx_logpseudomodel.cpp +++ b/fxjs/xfa/cjx_logpseudomodel.cpp @@ -28,6 +28,13 @@ CJX_LogPseudoModel::~CJX_LogPseudoModel() {} CJS_Return CJX_LogPseudoModel::message( CFX_V8* runtime, const std::vector>& params) { + // Uncomment to allow using xfa.log.message(""); from JS. + // fprintf(stderr, "LOG\n"); + // for (auto& val : params) { + // v8::String::Utf8Value str(runtime->GetIsolate(), val); + // fprintf(stderr, " %ls\n", WideString::FromUTF8(*str).c_str()); + // } + return CJS_Return(true); } -- cgit v1.2.3