summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Value.h
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/JS_Value.h')
-rw-r--r--fpdfsdk/javascript/JS_Value.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h
index b97a7061e3..c508fe80d7 100644
--- a/fpdfsdk/javascript/JS_Value.h
+++ b/fpdfsdk/javascript/JS_Value.h
@@ -17,6 +17,28 @@ class CJS_Document;
class CJS_Object;
class CJS_Runtime;
+class CJS_Return {
+ public:
+ explicit CJS_Return(bool);
+ explicit CJS_Return(const WideString&);
+ explicit CJS_Return(v8::Local<v8::Value>);
+ CJS_Return(const CJS_Return&);
+ ~CJS_Return();
+
+ bool HasError() const { return is_error_; }
+ WideString Error() const { return error_; }
+
+ bool HasReturn() const { return !return_.IsEmpty(); }
+ v8::Local<v8::Value> Return() const { return return_; }
+
+ private:
+ CJS_Return() = delete;
+
+ bool is_error_ = false;
+ WideString error_;
+ v8::Local<v8::Value> return_;
+};
+
class CJS_Value {
public:
CJS_Value();