diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-27 21:17:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-27 21:17:06 +0000 |
commit | 125eb3093a4632ee519041201ca904680f3a2245 (patch) | |
tree | e7a238e2d38f4e2d4926a7b38818c1ce896c6e14 /fxjs/cfxjse_engine.cpp | |
parent | 6146214d30ab16825908fe6ef96cb6d597cc3ca9 (diff) | |
download | pdfium-125eb3093a4632ee519041201ca904680f3a2245.tar.xz |
Tag XFA data bound to V8 Objects.
Because we don't want to trust anything V8 gives us back.
Use a deep namespace so we can have a short declaration in the
structs, but avoid collisions.
Change-Id: Ibb832a5dcd34c652159c3343dd70c9e2ee561537
Reviewed-on: https://pdfium-review.googlesource.com/38972
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_engine.cpp')
-rw-r--r-- | fxjs/cfxjse_engine.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp index cc584a3fa3..bf5778bf9a 100644 --- a/fxjs/cfxjse_engine.cpp +++ b/fxjs/cfxjse_engine.cpp @@ -31,10 +31,13 @@ #include "xfa/fxfa/parser/xfa_resolvenode_rs.h" #include "xfa/fxfa/parser/xfa_utils.h" +using pdfium::fxjse::kClassTag; + const FXJSE_CLASS_DESCRIPTOR GlobalClassDescriptor = { - "Root", // name - nullptr, // methods - 0, // method count + kClassTag, // tag + "Root", // name + nullptr, // methods + 0, // method count CFXJSE_Engine::GlobalPropTypeGetter, CFXJSE_Engine::GlobalPropertyGetter, CFXJSE_Engine::GlobalPropertySetter, @@ -42,6 +45,7 @@ const FXJSE_CLASS_DESCRIPTOR GlobalClassDescriptor = { }; const FXJSE_CLASS_DESCRIPTOR NormalClassDescriptor = { + kClassTag, // tag "XFAObject", // name nullptr, // methods 0, // method count @@ -52,6 +56,7 @@ const FXJSE_CLASS_DESCRIPTOR NormalClassDescriptor = { }; const FXJSE_CLASS_DESCRIPTOR VariablesClassDescriptor = { + kClassTag, // tag "XFAScriptObject", // name nullptr, // methods 0, // method count |