summaryrefslogtreecommitdiff
path: root/fxjs/xfa/cjx_desc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/xfa/cjx_desc.cpp')
-rw-r--r--fxjs/xfa/cjx_desc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fxjs/xfa/cjx_desc.cpp b/fxjs/xfa/cjx_desc.cpp
index 4efd1dde0e..7ff58a774a 100644
--- a/fxjs/xfa/cjx_desc.cpp
+++ b/fxjs/xfa/cjx_desc.cpp
@@ -6,8 +6,10 @@
#include "fxjs/xfa/cjx_desc.h"
-#include "fxjs/cfxjse_arguments.h"
+#include <vector>
+
#include "fxjs/cfxjse_value.h"
+#include "fxjs/js_resources.h"
#include "xfa/fxfa/parser/cxfa_desc.h"
const CJX_MethodSpec CJX_Desc::MethodSpecs[] = {{"metadata", metadata_static},
@@ -19,11 +21,9 @@ CJX_Desc::CJX_Desc(CXFA_Desc* desc) : CJX_Node(desc) {
CJX_Desc::~CJX_Desc() {}
-void CJX_Desc::metadata(CFXJSE_Arguments* pArguments) {
- int32_t argc = pArguments->GetLength();
- if (argc != 0 && argc != 1) {
- ThrowParamCountMismatchException(L"metadata");
- return;
- }
- pArguments->GetReturnValue()->SetString("");
+CJS_Return CJX_Desc::metadata(CJS_V8* runtime,
+ const std::vector<v8::Local<v8::Value>>& params) {
+ if (params.size() != 0 && params.size() != 1)
+ return CJS_Return(JSGetStringFromID(JSMessage::kParamError));
+ return CJS_Return(runtime->NewString(""));
}