summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Value.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-24 13:56:29 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-24 18:08:51 +0000
commit1b2a18ec4ed99fc2ac56b5fde230bc2b348d9725 (patch)
treea529fbb941a15197b050a0aa88e7a9403ff56152 /fpdfsdk/javascript/JS_Value.h
parent65f3162c91607071322967ea064a4a11e3904722 (diff)
downloadpdfium-1b2a18ec4ed99fc2ac56b5fde230bc2b348d9725.tar.xz
Remove the CJS_Value To* methods.
This CL removes all of the To* methods on the CJS classes except for ToV8Value. Change-Id: If01263c8cfa557ef7b00f573ddbf68b591d5ae9a Reviewed-on: https://pdfium-review.googlesource.com/16614 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/javascript/JS_Value.h')
-rw-r--r--fpdfsdk/javascript/JS_Value.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/fpdfsdk/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h
index c0e267a4a5..07e5986527 100644
--- a/fpdfsdk/javascript/JS_Value.h
+++ b/fpdfsdk/javascript/JS_Value.h
@@ -42,18 +42,6 @@ class CJS_Value {
Type GetType() const { return GetValueType(m_pValue); }
- int ToInt(CJS_Runtime* pRuntime) const;
- bool ToBool(CJS_Runtime* pRuntime) const;
- double ToDouble(CJS_Runtime* pRuntime) const;
- float ToFloat(CJS_Runtime* pRuntime) const;
- CJS_Object* ToObject(CJS_Runtime* pRuntime) const;
- CJS_Document* ToDocument(CJS_Runtime* pRuntime) const;
- CJS_Array ToArray(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() const;
// Replace the current |m_pValue| with a v8::Number if possible
@@ -82,7 +70,7 @@ class CJS_Array {
unsigned index,
const CJS_Value& value);
- v8::Local<v8::Array> ToV8Array(CJS_Runtime* pRuntime) const;
+ v8::Local<v8::Value> ToV8Value() const { return m_pArray; }
private:
mutable v8::Local<v8::Array> m_pArray;
@@ -112,10 +100,9 @@ class CJS_Date {
int GetMinutes(CJS_Runtime* pRuntime) const;
int GetSeconds(CJS_Runtime* pRuntime) const;
- v8::Local<v8::Date> ToV8Date() const;
- WideString ToWideString(int style) const;
+ v8::Local<v8::Value> ToV8Value() const { return m_pDate; }
- protected:
+ private:
v8::Local<v8::Date> m_pDate;
};