diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-02-05 22:27:22 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-02-05 22:27:22 +0000 |
commit | f743552fbdb17f974c9b1675af81210fe0ffcc50 (patch) | |
tree | d0eccefff3c758151428e18eb803e93d8864046a /fxjs/cjs_report.cpp | |
parent | 998fee395fc8a543968c7db3db9e3cf81dee57fc (diff) | |
download | pdfium-f743552fbdb17f974c9b1675af81210fe0ffcc50.tar.xz |
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 <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_report.cpp')
-rw-r--r-- | fxjs/cjs_report.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
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<CJS_Report>, - JSDestructor); + ObjDefnID = pEngine->DefineObj(CJS_Report::kName, eObjType, + JSConstructor<CJS_Report>, JSDestructor); DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs)); } -CJS_Report::CJS_Report(v8::Local<v8::Object> pObject) : CJS_Object(pObject) { - m_pEmbedObj = pdfium::MakeUnique<Report>(this); -} - -Report::Report(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {} +CJS_Report::CJS_Report(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} -Report::~Report() = default; +CJS_Report::~CJS_Report() = default; -CJS_Return Report::writeText(CJS_Runtime* pRuntime, - const std::vector<v8::Local<v8::Value>>& params) { +CJS_Return CJS_Report::writeText( + CJS_Runtime* pRuntime, + const std::vector<v8::Local<v8::Value>>& params) { // Unsafe, not supported. return CJS_Return(true); } -CJS_Return Report::save(CJS_Runtime* pRuntime, - const std::vector<v8::Local<v8::Value>>& params) { +CJS_Return CJS_Report::save(CJS_Runtime* pRuntime, + const std::vector<v8::Local<v8::Value>>& params) { // Unsafe, not supported. return CJS_Return(true); } |