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.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h
index 49dd2492da..72d381e188 100644
--- a/fpdfsdk/javascript/JS_Value.h
+++ b/fpdfsdk/javascript/JS_Value.h
@@ -32,34 +32,22 @@ class CJS_Value {
static Type GetValueType(v8::Local<v8::Value> value);
- explicit CJS_Value(CJS_Runtime* pRuntime);
- CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Value> pValue);
+ CJS_Value();
+ explicit CJS_Value(v8::Local<v8::Value> pValue);
CJS_Value(CJS_Runtime* pRuntime, int iValue);
CJS_Value(CJS_Runtime* pRuntime, double dValue);
CJS_Value(CJS_Runtime* pRuntime, bool bValue);
- CJS_Value(CJS_Runtime* pRuntime, CJS_Object* pObj);
+ explicit CJS_Value(CJS_Object* pObj);
CJS_Value(CJS_Runtime* pRuntime, const char* pStr);
CJS_Value(CJS_Runtime* pRuntime, const wchar_t* pWstr);
CJS_Value(CJS_Runtime* pRuntime, const CJS_Array& array);
- CJS_Value(CJS_Runtime* pRuntime, const CJS_Date& date);
- CJS_Value(CJS_Runtime* pRuntime, const CJS_Object* object);
+ explicit CJS_Value(const CJS_Date& date);
CJS_Value(const CJS_Value& other);
~CJS_Value();
// These calls may re-enter JS (and hence invalidate objects).
- void Set(CJS_Runtime* pRuntime, int val);
- void Set(CJS_Runtime* pRuntime, bool val);
- void Set(CJS_Runtime* pRuntime, double val);
- void Set(CJS_Runtime* pRuntime, CJS_Object* pObj);
- void Set(CJS_Runtime* pRuntime, CJS_Document* pJsDoc);
- void Set(CJS_Runtime* pRuntime, const ByteString&);
- void Set(CJS_Runtime* pRuntime, const WideString&);
- void Set(CJS_Runtime* pRuntime, const wchar_t* c_string);
- void Set(CJS_Runtime* pRuntime, const CJS_Array& array);
- void Set(CJS_Runtime* pRuntime, const CJS_Date& date);
- void Set(CJS_Runtime* pRuntime, v8::Local<v8::Value> pValue);
- void SetNull(CJS_Runtime* pRuntime);
+ void Set(v8::Local<v8::Value> pValue);
Type GetType() const { return GetValueType(m_pValue); }
@@ -70,12 +58,12 @@ class CJS_Value {
CJS_Object* ToObject(CJS_Runtime* pRuntime) const;
CJS_Document* ToDocument(CJS_Runtime* pRuntime) const;
CJS_Array ToArray(CJS_Runtime* pRuntime) const;
- CJS_Date ToDate(CJS_Runtime* pRuntime) const;
+ CJS_Date ToDate() const;
WideString ToWideString(CJS_Runtime* pRuntime) const;
ByteString ToByteString(CJS_Runtime* pRuntime) const;
v8::Local<v8::Object> ToV8Object(CJS_Runtime* pRuntime) const;
v8::Local<v8::Array> ToV8Array(CJS_Runtime* pRuntime) const;
- v8::Local<v8::Value> ToV8Value(CJS_Runtime* pRuntime) const;
+ v8::Local<v8::Value> ToV8Value() const;
// Replace the current |m_pValue| with a v8::Number if possible
// to make one from the current |m_pValue|.
@@ -133,7 +121,7 @@ class CJS_Date {
int GetMinutes(CJS_Runtime* pRuntime) const;
int GetSeconds(CJS_Runtime* pRuntime) const;
- v8::Local<v8::Date> ToV8Date(CJS_Runtime* pRuntime) const;
+ v8::Local<v8::Date> ToV8Date() const;
WideString ToWideString(int style) const;
protected: