From f743552fbdb17f974c9b1675af81210fe0ffcc50 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 5 Feb 2018 22:27:22 +0000 Subject: Fold CJS_EmbedObj classes into CJS_Object classes This CL removes the CJS_EmbedObj class and various subclasses and folds the subclasses into their CJS_Object counterparts. Change-Id: If6b882a4995c0b1bf83ac783f5c27ba9216c2d5c Reviewed-on: https://pdfium-review.googlesource.com/25410 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- fxjs/cjs_report.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'fxjs/cjs_report.cpp') diff --git a/fxjs/cjs_report.cpp b/fxjs/cjs_report.cpp index a5e544151e..2f5490c472 100644 --- a/fxjs/cjs_report.cpp +++ b/fxjs/cjs_report.cpp @@ -16,30 +16,28 @@ const JSMethodSpec CJS_Report::MethodSpecs[] = { {"writeText", writeText_static}}; int CJS_Report::ObjDefnID = -1; +const char CJS_Report::kName[] = "Report"; // static void CJS_Report::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("Report", eObjType, JSConstructor, - JSDestructor); + ObjDefnID = pEngine->DefineObj(CJS_Report::kName, eObjType, + JSConstructor, JSDestructor); DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs)); } -CJS_Report::CJS_Report(v8::Local pObject) : CJS_Object(pObject) { - m_pEmbedObj = pdfium::MakeUnique(this); -} - -Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {} +CJS_Report::CJS_Report(v8::Local pObject) : CJS_Object(pObject) {} -Report::~Report() = default; +CJS_Report::~CJS_Report() = default; -CJS_Return Report::writeText(CJS_Runtime* pRuntime, - const std::vector>& params) { +CJS_Return CJS_Report::writeText( + CJS_Runtime* pRuntime, + const std::vector>& params) { // Unsafe, not supported. return CJS_Return(true); } -CJS_Return Report::save(CJS_Runtime* pRuntime, - const std::vector>& params) { +CJS_Return CJS_Report::save(CJS_Runtime* pRuntime, + const std::vector>& params) { // Unsafe, not supported. return CJS_Return(true); } -- cgit v1.2.3