From 1699982f45d01cb18585eba80cce5326a63d3b67 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 8 Jun 2018 18:23:05 +0000 Subject: Ensure CJS_Return() with error always includes a message. Change the signature of the constructors to make it impossible to do this otherwise. Change-Id: I14e88d98a1128f2d599459ce9337cd6d079469fe Reviewed-on: https://pdfium-review.googlesource.com/34531 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fxjs/xfa/cjx_object.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fxjs/xfa/cjx_object.cpp') diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index ba914221bd..d357c56091 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -172,7 +172,8 @@ CJS_Return CJX_Object::RunMethod( const std::vector>& params) { auto it = method_specs_.find(func.UTF8Encode()); if (it == method_specs_.end()) - return CJS_Return(false); + return CJS_Return(JSMessage::kUnknownMethod); + return it->second(this, GetXFAObject()->GetDocument()->GetScriptContext(), params); } -- cgit v1.2.3