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 <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/cjs_border.cpp b/fxjs/cjs_border.cpp
index b813cbb..35204d7 100644
--- a/fxjs/cjs_border.cpp
+++ b/fxjs/cjs_border.cpp
@@ -21,8 +21,3 @@
pEngine->DefineObj("border", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_Border::CJS_Border(v8::Local<v8::Object> 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 ceb9b03..0a306f7 100644
--- a/fxjs/cjs_border.h
+++ b/fxjs/cjs_border.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_Border(v8::Local<v8::Object> 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 18ecde0..71d6c02 100644
--- a/fxjs/cjs_display.cpp
+++ b/fxjs/cjs_display.cpp
@@ -20,8 +20,3 @@
pEngine->DefineObj("display", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_Display::CJS_Display(v8::Local<v8::Object> 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 eaa700e..59b6e9c 100644
--- a/fxjs/cjs_display.h
+++ b/fxjs/cjs_display.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_Display(v8::Local<v8::Object> 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 8594da7..0e6e94b 100644
--- a/fxjs/cjs_font.cpp
+++ b/fxjs/cjs_font.cpp
@@ -29,8 +29,3 @@
ObjDefnID = pEngine->DefineObj("font", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_Font::CJS_Font(v8::Local<v8::Object> 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 39de804..d3cf159 100644
--- a/fxjs/cjs_font.h
+++ b/fxjs/cjs_font.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_Font(v8::Local<v8::Object> 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 5c95281..4ada397 100644
--- a/fxjs/cjs_highlight.cpp
+++ b/fxjs/cjs_highlight.cpp
@@ -20,9 +20,3 @@
pEngine->DefineObj("highlight", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_Highlight::CJS_Highlight(v8::Local<v8::Object> 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 5290c17..efec127 100644
--- a/fxjs/cjs_highlight.h
+++ b/fxjs/cjs_highlight.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_Highlight(v8::Local<v8::Object> 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 6269863..dc9594e 100644
--- a/fxjs/cjs_position.cpp
+++ b/fxjs/cjs_position.cpp
@@ -23,8 +23,3 @@
pEngine->DefineObj("position", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_Position::CJS_Position(v8::Local<v8::Object> 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 f5c386b..ae951bf 100644
--- a/fxjs/cjs_position.h
+++ b/fxjs/cjs_position.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_Position(v8::Local<v8::Object> 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 f284c24..999949c 100644
--- a/fxjs/cjs_scalehow.cpp
+++ b/fxjs/cjs_scalehow.cpp
@@ -18,8 +18,3 @@
pEngine->DefineObj("scaleHow", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_ScaleHow::CJS_ScaleHow(v8::Local<v8::Object> 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 a5c895a..f8c7eb5 100644
--- a/fxjs/cjs_scalehow.h
+++ b/fxjs/cjs_scalehow.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_ScaleHow(v8::Local<v8::Object> 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 41dc41a..5f39153 100644
--- a/fxjs/cjs_scalewhen.cpp
+++ b/fxjs/cjs_scalewhen.cpp
@@ -20,9 +20,3 @@
pEngine->DefineObj("scaleWhen", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_ScaleWhen::CJS_ScaleWhen(v8::Local<v8::Object> 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 77980dc..ef046f9 100644
--- a/fxjs/cjs_scalewhen.h
+++ b/fxjs/cjs_scalewhen.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_ScaleWhen(v8::Local<v8::Object> 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 89744a2..c068702 100644
--- a/fxjs/cjs_style.cpp
+++ b/fxjs/cjs_style.cpp
@@ -21,8 +21,3 @@
ObjDefnID = pEngine->DefineObj("style", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_Style::CJS_Style(v8::Local<v8::Object> 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 6d11170..6e3ee2f 100644
--- a/fxjs/cjs_style.h
+++ b/fxjs/cjs_style.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_Style(v8::Local<v8::Object> 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 85a1b5d..cdaa2d5 100644
--- a/fxjs/cjs_zoomtype.cpp
+++ b/fxjs/cjs_zoomtype.cpp
@@ -23,8 +23,3 @@
pEngine->DefineObj("zoomtype", FXJSOBJTYPE_STATIC, nullptr, nullptr);
DefineConsts(pEngine, ObjDefnID, ConstSpecs);
}
-
-CJS_Zoomtype::CJS_Zoomtype(v8::Local<v8::Object> 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 dc9897a..de268cd 100644
--- a/fxjs/cjs_zoomtype.h
+++ b/fxjs/cjs_zoomtype.h
@@ -13,8 +13,7 @@
public:
static void DefineJSObjects(CFXJS_Engine* pEngine);
- CJS_Zoomtype(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
- ~CJS_Zoomtype() override;
+ CJS_Zoomtype() = delete;
private:
static int ObjDefnID;