summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-23 20:37:33 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-23 20:37:33 +0000
commitce0f004523fdc098186bc453a85543c20b0059a7 (patch)
tree160264daa27f156a16397928f83ce94b319ef588
parentf52fb7021299ae5a49121ea94774656d88b3fb1a (diff)
downloadpdfium-ce0f004523fdc098186bc453a85543c20b0059a7.tar.xz
Remove CJS_Report class.
Its methods are never registered with JavaScript, so they can't be called, and they don't do anything anyways. In fact, the signature of its DefineJSObjects() method is about 2 years out of date ... Change-Id: I028d43ff2c7fa5ab0f59c5790fee3fa91d2f20ac Reviewed-on: https://pdfium-review.googlesource.com/c/44533 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--fxjs/BUILD.gn2
-rw-r--r--fxjs/cjs_report.cpp49
-rw-r--r--fxjs/cjs_report.h37
-rw-r--r--fxjs/cjs_runtime.cpp1
4 files changed, 0 insertions, 89 deletions
diff --git a/fxjs/BUILD.gn b/fxjs/BUILD.gn
index 5f475edd7a..71551c3137 100644
--- a/fxjs/BUILD.gn
+++ b/fxjs/BUILD.gn
@@ -76,8 +76,6 @@ jumbo_source_set("fxjs") {
"cjs_position.h",
"cjs_publicmethods.cpp",
"cjs_publicmethods.h",
- "cjs_report.cpp",
- "cjs_report.h",
"cjs_result.cpp",
"cjs_result.h",
"cjs_runtime.cpp",
diff --git a/fxjs/cjs_report.cpp b/fxjs/cjs_report.cpp
deleted file mode 100644
index 1cebefe2cc..0000000000
--- a/fxjs/cjs_report.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "fxjs/cjs_report.h"
-
-#include <vector>
-
-#include "fxjs/cjs_object.h"
-#include "fxjs/js_define.h"
-
-const JSMethodSpec CJS_Report::MethodSpecs[] = {
- {"save", save_static},
- {"writeText", writeText_static}};
-
-int CJS_Report::ObjDefnID = -1;
-const char CJS_Report::kName[] = "Report";
-
-// static
-int CJS_Report::GetObjDefnID() {
- return ObjDefnID;
-}
-
-// static
-void CJS_Report::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) {
- ObjDefnID = pEngine->DefineObj(CJS_Report::kName, eObjType,
- JSConstructor<CJS_Report>, JSDestructor);
- DefineMethods(pEngine, ObjDefnID, MethodSpecs);
-}
-
-CJS_Report::CJS_Report(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
- : CJS_Object(pObject, pRuntime) {}
-
-CJS_Report::~CJS_Report() = default;
-
-CJS_Result CJS_Report::writeText(
- CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params) {
- // Unsafe, not supported, but do not return error.
- return CJS_Result::Success();
-}
-
-CJS_Result CJS_Report::save(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params) {
- // Unsafe, not supported, but do not return error.
- return CJS_Result::Success();
-}
diff --git a/fxjs/cjs_report.h b/fxjs/cjs_report.h
deleted file mode 100644
index 919664dd65..0000000000
--- a/fxjs/cjs_report.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef FXJS_CJS_REPORT_H_
-#define FXJS_CJS_REPORT_H_
-
-#include <vector>
-
-#include "fxjs/cjs_object.h"
-#include "fxjs/js_define.h"
-
-class CJS_Report final : public CJS_Object {
- public:
- static int GetObjDefnID();
- static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType);
-
- CJS_Report(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
- ~CJS_Report() override;
-
- JS_STATIC_METHOD(save, CJS_Report);
- JS_STATIC_METHOD(writeText, CJS_Report);
-
- private:
- static int ObjDefnID;
- static const char kName[];
- static const JSMethodSpec MethodSpecs[];
-
- CJS_Result save(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params);
- CJS_Result writeText(CJS_Runtime* pRuntime,
- const std::vector<v8::Local<v8::Value>>& params);
-};
-
-#endif // FXJS_CJS_REPORT_H_
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp
index 3914b36715..5364571919 100644
--- a/fxjs/cjs_runtime.cpp
+++ b/fxjs/cjs_runtime.cpp
@@ -30,7 +30,6 @@
#include "fxjs/cjs_object.h"
#include "fxjs/cjs_position.h"
#include "fxjs/cjs_publicmethods.h"
-#include "fxjs/cjs_report.h"
#include "fxjs/cjs_scalehow.h"
#include "fxjs/cjs_scalewhen.h"
#include "fxjs/cjs_style.h"