From 007daeb3fbd9ace2c1cbdf85d0fa98ebfa00163c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 29 Oct 2018 20:55:28 +0000 Subject: Remove ctors from CJS_ objects which cant be instantiated. Because they only provide constants. Change-Id: I79cdc78b4d0c1d6e8d6276b4ce7bb301755802c9 Reviewed-on: https://pdfium-review.googlesource.com/c/44791 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- fxjs/cjs_border.cpp | 5 ----- fxjs/cjs_border.h | 3 +-- fxjs/cjs_display.cpp | 5 ----- fxjs/cjs_display.h | 3 +-- fxjs/cjs_font.cpp | 5 ----- fxjs/cjs_font.h | 3 +-- fxjs/cjs_highlight.cpp | 6 ------ fxjs/cjs_highlight.h | 3 +-- fxjs/cjs_position.cpp | 5 ----- fxjs/cjs_position.h | 3 +-- fxjs/cjs_scalehow.cpp | 5 ----- fxjs/cjs_scalehow.h | 3 +-- fxjs/cjs_scalewhen.cpp | 6 ------ fxjs/cjs_scalewhen.h | 3 +-- fxjs/cjs_style.cpp | 5 ----- fxjs/cjs_style.h | 3 +-- fxjs/cjs_zoomtype.cpp | 5 ----- fxjs/cjs_zoomtype.h | 3 +-- 18 files changed, 9 insertions(+), 65 deletions(-) diff --git a/fxjs/cjs_border.cpp b/fxjs/cjs_border.cpp index b813cbb442..35204d771c 100644 --- a/fxjs/cjs_border.cpp +++ b/fxjs/cjs_border.cpp @@ -21,8 +21,3 @@ void CJS_Border::DefineJSObjects(CFXJS_Engine* pEngine) { pEngine->DefineObj("border", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_Border::CJS_Border(v8::Local pObject, CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_Border::~CJS_Border() = default; diff --git a/fxjs/cjs_border.h b/fxjs/cjs_border.h index ceb9b03a33..0a306f7f88 100644 --- a/fxjs/cjs_border.h +++ b/fxjs/cjs_border.h @@ -13,8 +13,7 @@ class CJS_Border final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_Border(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_Border() override; + CJS_Border() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_display.cpp b/fxjs/cjs_display.cpp index 18ecde0974..71d6c024fd 100644 --- a/fxjs/cjs_display.cpp +++ b/fxjs/cjs_display.cpp @@ -20,8 +20,3 @@ void CJS_Display::DefineJSObjects(CFXJS_Engine* pEngine) { pEngine->DefineObj("display", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_Display::CJS_Display(v8::Local pObject, CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_Display::~CJS_Display() = default; diff --git a/fxjs/cjs_display.h b/fxjs/cjs_display.h index eaa700ed7c..59b6e9c014 100644 --- a/fxjs/cjs_display.h +++ b/fxjs/cjs_display.h @@ -13,8 +13,7 @@ class CJS_Display final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_Display(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_Display() override; + CJS_Display() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_font.cpp b/fxjs/cjs_font.cpp index 8594da7242..0e6e94bed8 100644 --- a/fxjs/cjs_font.cpp +++ b/fxjs/cjs_font.cpp @@ -29,8 +29,3 @@ void CJS_Font::DefineJSObjects(CFXJS_Engine* pEngine) { ObjDefnID = pEngine->DefineObj("font", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_Font::CJS_Font(v8::Local pObject, CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_Font::~CJS_Font() = default; diff --git a/fxjs/cjs_font.h b/fxjs/cjs_font.h index 39de804f06..d3cf1592de 100644 --- a/fxjs/cjs_font.h +++ b/fxjs/cjs_font.h @@ -13,8 +13,7 @@ class CJS_Font final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_Font(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_Font() override; + CJS_Font() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_highlight.cpp b/fxjs/cjs_highlight.cpp index 5c95281875..4ada397cc3 100644 --- a/fxjs/cjs_highlight.cpp +++ b/fxjs/cjs_highlight.cpp @@ -20,9 +20,3 @@ void CJS_Highlight::DefineJSObjects(CFXJS_Engine* pEngine) { pEngine->DefineObj("highlight", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_Highlight::CJS_Highlight(v8::Local pObject, - CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_Highlight::~CJS_Highlight() = default; diff --git a/fxjs/cjs_highlight.h b/fxjs/cjs_highlight.h index 5290c17688..efec12714b 100644 --- a/fxjs/cjs_highlight.h +++ b/fxjs/cjs_highlight.h @@ -13,8 +13,7 @@ class CJS_Highlight final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_Highlight(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_Highlight() override; + CJS_Highlight() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_position.cpp b/fxjs/cjs_position.cpp index 626986301c..dc9594ef5f 100644 --- a/fxjs/cjs_position.cpp +++ b/fxjs/cjs_position.cpp @@ -23,8 +23,3 @@ void CJS_Position::DefineJSObjects(CFXJS_Engine* pEngine) { pEngine->DefineObj("position", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_Position::CJS_Position(v8::Local pObject, CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_Position::~CJS_Position() = default; diff --git a/fxjs/cjs_position.h b/fxjs/cjs_position.h index f5c386bc21..ae951bf690 100644 --- a/fxjs/cjs_position.h +++ b/fxjs/cjs_position.h @@ -13,8 +13,7 @@ class CJS_Position final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_Position(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_Position() override; + CJS_Position() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_scalehow.cpp b/fxjs/cjs_scalehow.cpp index f284c24c1c..999949cda0 100644 --- a/fxjs/cjs_scalehow.cpp +++ b/fxjs/cjs_scalehow.cpp @@ -18,8 +18,3 @@ void CJS_ScaleHow::DefineJSObjects(CFXJS_Engine* pEngine) { pEngine->DefineObj("scaleHow", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_ScaleHow::CJS_ScaleHow(v8::Local pObject, CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_ScaleHow::~CJS_ScaleHow() = default; diff --git a/fxjs/cjs_scalehow.h b/fxjs/cjs_scalehow.h index a5c895ac6b..f8c7eb5368 100644 --- a/fxjs/cjs_scalehow.h +++ b/fxjs/cjs_scalehow.h @@ -13,8 +13,7 @@ class CJS_ScaleHow final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_ScaleHow(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_ScaleHow() override; + CJS_ScaleHow() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_scalewhen.cpp b/fxjs/cjs_scalewhen.cpp index 41dc41a8d1..5f39153776 100644 --- a/fxjs/cjs_scalewhen.cpp +++ b/fxjs/cjs_scalewhen.cpp @@ -20,9 +20,3 @@ void CJS_ScaleWhen::DefineJSObjects(CFXJS_Engine* pEngine) { pEngine->DefineObj("scaleWhen", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_ScaleWhen::CJS_ScaleWhen(v8::Local pObject, - CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_ScaleWhen::~CJS_ScaleWhen() = default; diff --git a/fxjs/cjs_scalewhen.h b/fxjs/cjs_scalewhen.h index 77980dc70a..ef046f93ba 100644 --- a/fxjs/cjs_scalewhen.h +++ b/fxjs/cjs_scalewhen.h @@ -13,8 +13,7 @@ class CJS_ScaleWhen final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_ScaleWhen(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_ScaleWhen() override; + CJS_ScaleWhen() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_style.cpp b/fxjs/cjs_style.cpp index 89744a23ff..c068702f11 100644 --- a/fxjs/cjs_style.cpp +++ b/fxjs/cjs_style.cpp @@ -21,8 +21,3 @@ void CJS_Style::DefineJSObjects(CFXJS_Engine* pEngine) { ObjDefnID = pEngine->DefineObj("style", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_Style::CJS_Style(v8::Local pObject, CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_Style::~CJS_Style() = default; diff --git a/fxjs/cjs_style.h b/fxjs/cjs_style.h index 6d11170f0e..6e3ee2fbc2 100644 --- a/fxjs/cjs_style.h +++ b/fxjs/cjs_style.h @@ -13,8 +13,7 @@ class CJS_Style final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_Style(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_Style() override; + CJS_Style() = delete; private: static int ObjDefnID; diff --git a/fxjs/cjs_zoomtype.cpp b/fxjs/cjs_zoomtype.cpp index 85a1b5d3b3..cdaa2d5cf1 100644 --- a/fxjs/cjs_zoomtype.cpp +++ b/fxjs/cjs_zoomtype.cpp @@ -23,8 +23,3 @@ void CJS_Zoomtype::DefineJSObjects(CFXJS_Engine* pEngine) { pEngine->DefineObj("zoomtype", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } - -CJS_Zoomtype::CJS_Zoomtype(v8::Local pObject, CJS_Runtime* pRuntime) - : CJS_Object(pObject, pRuntime) {} - -CJS_Zoomtype::~CJS_Zoomtype() = default; diff --git a/fxjs/cjs_zoomtype.h b/fxjs/cjs_zoomtype.h index dc9897acc3..de268cd71c 100644 --- a/fxjs/cjs_zoomtype.h +++ b/fxjs/cjs_zoomtype.h @@ -13,8 +13,7 @@ class CJS_Zoomtype final : public CJS_Object { public: static void DefineJSObjects(CFXJS_Engine* pEngine); - CJS_Zoomtype(v8::Local pObject, CJS_Runtime* pRuntime); - ~CJS_Zoomtype() override; + CJS_Zoomtype() = delete; private: static int ObjDefnID; -- cgit v1.2.3