Index: fpdfsdk/javascript/JS_Value.h |
diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h |
index e8544504d20e28393fbe80eff74b4490a8b24f76..c48c789cdb4c723396ed10589fe32d5534a71264 100644 |
--- a/fpdfsdk/javascript/JS_Value.h |
+++ b/fpdfsdk/javascript/JS_Value.h |
@@ -27,13 +27,12 @@ class CJS_Value { |
VT_boolean, |
VT_date, |
VT_object, |
- VT_fxobject, |
VT_null, |
VT_undefined |
}; |
CJS_Value(CJS_Runtime* pRuntime); |
- CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Value> pValue, Type t); |
+ CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Value> pValue); |
CJS_Value(CJS_Runtime* pRuntime, const int& iValue); |
CJS_Value(CJS_Runtime* pRuntime, const double& dValue); |
CJS_Value(CJS_Runtime* pRuntime, const float& fValue); |
@@ -49,11 +48,12 @@ class CJS_Value { |
CJS_Value(const CJS_Value& other); |
void SetNull(); |
- void Attach(v8::Local<v8::Value> pValue, Type t); |
+ void Attach(v8::Local<v8::Value> pValue); |
void Attach(CJS_Value* pValue); |
void Detach(); |
- Type GetType() const; |
+ static Type GetValueType(v8::Local<v8::Value> value); |
+ Type GetType() const { return GetValueType(m_pValue); } |
int ToInt() const; |
bool ToBool() const; |
double ToDouble() const; |
@@ -66,8 +66,7 @@ class CJS_Value { |
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|, updating |m_eType| |
- // as appropriate to indicate the result. |
+ // to make one from the current |m_pValue|. |
void MaybeCoerceToNumber(); |
void operator=(int iValue); |
@@ -91,7 +90,6 @@ class CJS_Value { |
CJS_Runtime* GetJSRuntime() const { return m_pJSRuntime; } |
protected: |
- Type m_eType; |
v8::Local<v8::Value> m_pValue; |
CJS_Runtime* m_pJSRuntime; |
}; |