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/cjs_console.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fxjs/cjs_console.cpp') diff --git a/fxjs/cjs_console.cpp b/fxjs/cjs_console.cpp index 867913ca6f..02babea19e 100644 --- a/fxjs/cjs_console.cpp +++ b/fxjs/cjs_console.cpp @@ -35,21 +35,21 @@ CJS_Console::~CJS_Console() = default; CJS_Return CJS_Console::clear(CJS_Runtime* pRuntime, const std::vector>& params) { - return CJS_Return(true); + return CJS_Return(); } CJS_Return CJS_Console::hide(CJS_Runtime* pRuntime, const std::vector>& params) { - return CJS_Return(true); + return CJS_Return(); } CJS_Return CJS_Console::println( CJS_Runtime* pRuntime, const std::vector>& params) { - return CJS_Return(params.size() > 0); + return CJS_Return(); } CJS_Return CJS_Console::show(CJS_Runtime* pRuntime, const std::vector>& params) { - return CJS_Return(true); + return CJS_Return(); } -- cgit v1.2.3