summaryrefslogtreecommitdiff
path: root/fxjs/cjs_util.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-07-17 21:33:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-17 21:33:37 +0000
commitb6b5a2dcd7cc4302d5f20e21ab637be1b03d1019 (patch)
tree18dd0ca96150a77d13077bf3f57b5ec33795adf3 /fxjs/cjs_util.cpp
parenta0f8d235c80192931ed1db0c4f300c67c361cd98 (diff)
downloadpdfium-b6b5a2dcd7cc4302d5f20e21ab637be1b03d1019.tar.xz
M68: Check GetObjDefnID() in various JS functions.
Consolidate all the checks into JSGetObject(), and add GetObjDefnID() methods for classes that are missing it. BUG=chromium:862059 Change-Id: I2c2b725a01dcd259ef712d2513fcf740cc410b15 Reviewed-on: https://pdfium-review.googlesource.com/37510 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> (cherry picked from commit ad1f7b410cd6885bd22d9ee49d9f80d3017f131f) Reviewed-on: https://pdfium-review.googlesource.com/38030 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cjs_util.cpp')
-rw-r--r--fxjs/cjs_util.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/fxjs/cjs_util.cpp b/fxjs/cjs_util.cpp
index 883d022006..0184d44eb4 100644
--- a/fxjs/cjs_util.cpp
+++ b/fxjs/cjs_util.cpp
@@ -68,6 +68,11 @@ int CJS_Util::ObjDefnID = -1;
const char CJS_Util::kName[] = "util";
// static
+int CJS_Util::GetObjDefnID() {
+ return ObjDefnID;
+}
+
+// static
void CJS_Util::DefineJSObjects(CFXJS_Engine* pEngine) {
ObjDefnID = pEngine->DefineObj(CJS_Util::kName, FXJSOBJTYPE_STATIC,
JSConstructor<CJS_Util>, JSDestructor);