summaryrefslogtreecommitdiff
path: root/fxjs/cjs_app.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-07-11 13:04:43 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-11 13:04:43 +0000
commitad1f7b410cd6885bd22d9ee49d9f80d3017f131f (patch)
tree6a7a9fa616004ab6c457c46682dd00125952913b /fxjs/cjs_app.cpp
parentb1a4db5551ca7c211c8acbec2b657d25fa7d7f1d (diff)
downloadpdfium-ad1f7b410cd6885bd22d9ee49d9f80d3017f131f.tar.xz
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>
Diffstat (limited to 'fxjs/cjs_app.cpp')
-rw-r--r--fxjs/cjs_app.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/fxjs/cjs_app.cpp b/fxjs/cjs_app.cpp
index f52d7e9230..4648f462b4 100644
--- a/fxjs/cjs_app.cpp
+++ b/fxjs/cjs_app.cpp
@@ -84,6 +84,11 @@ int CJS_App::ObjDefnID = -1;
const char CJS_App::kName[] = "app";
// static
+int CJS_App::GetObjDefnID() {
+ return ObjDefnID;
+}
+
+// static
void CJS_App::DefineJSObjects(CFXJS_Engine* pEngine) {
ObjDefnID = pEngine->DefineObj(CJS_App::kName, FXJSOBJTYPE_STATIC,
JSConstructor<CJS_App>, JSDestructor);