Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Unified Diff: fpdfsdk/src/javascript/JS_Runtime.cpp

Issue 1399833002: Allow building of XFA branch without XFA (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Keep GN in sync. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_mgr.cpp ('k') | pdfium.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Runtime.cpp
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index d01c1fae7df52f3b5f92255587df04723a9ff899..8a0d6666bb5de5b479275acb32298aaada685c3d 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;
}
« no previous file with comments | « fpdfsdk/src/fsdk_mgr.cpp ('k') | pdfium.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698