summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-12 15:47:07 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-12 15:47:07 -0700
commita8a39e25af3c19bb91434fdf367cffa0e1536934 (patch)
treed6bfa30a756014ec79dfce75d6658ecf3778594a /fpdfsdk/src/javascript
parent5ef9faa8e8f5593556d78f775d86f1e52e4c341a (diff)
downloadpdfium-a8a39e25af3c19bb91434fdf367cffa0e1536934.tar.xz
Allow building of XFA branch without XFA
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1399833002 .
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index d01c1fae7d..8a0d6666bb 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -222,6 +222,7 @@ CFX_WideString ChangeObjName(const CFX_WideString& str) {
}
FX_BOOL CJS_Runtime::GetHValueByName(const CFX_ByteStringC& utf8Name,
FXJSE_HVALUE hValue) {
+#ifdef PDF_ENABLE_XFA
const FX_CHAR* name = utf8Name.GetCStr();
v8::Locker lock(GetIsolate());
@@ -242,11 +243,13 @@ FX_BOOL CJS_Runtime::GetHValueByName(const CFX_ByteStringC& utf8Name,
return FALSE;
}
((CFXJSE_Value*)hValue)->ForceSetValue(propvalue);
+#endif
return TRUE;
}
FX_BOOL CJS_Runtime::SetHValueByName(const CFX_ByteStringC& utf8Name,
FXJSE_HVALUE hValue) {
+#ifdef PDF_ENABLE_XFA
if (utf8Name.IsEmpty() || hValue == NULL)
return FALSE;
const FX_CHAR* name = utf8Name.GetCStr();
@@ -266,7 +269,7 @@ FX_BOOL CJS_Runtime::SetHValueByName(const CFX_ByteStringC& utf8Name,
v8::String::NewFromUtf8(pIsolate, name, v8::String::kNormalString,
utf8Name.GetLength()),
propvalue);
-
+#endif
return TRUE;
}