OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/JS_Define.h" | 8 #include "../../include/javascript/JS_Define.h" |
9 #include "../../include/javascript/JS_Object.h" | 9 #include "../../include/javascript/JS_Object.h" |
10 #include "../../include/javascript/JS_Value.h" | 10 #include "../../include/javascript/JS_Value.h" |
11 | 11 |
12 /* ---------------------------- CJS_Value ---------------------------- */ | 12 /* ---------------------------- CJS_Value ---------------------------- */ |
13 | 13 |
14 CJS_Value::CJS_Value(v8::Isolate* isolate) : m_isolate(isolate),m_eType(VT_unkno
wn) | 14 CJS_Value::CJS_Value(v8::Isolate* isolate) : m_eType(VT_unknown),m_isolate(isola
te) |
15 { | 15 { |
16 } | 16 } |
17 CJS_Value::CJS_Value(v8::Isolate* isolate, v8::Handle<v8::Value> pValue,FXJSVALU
ETYPE t) :m_isolate(isolate), m_pValue(pValue) , m_eType(t) | 17 CJS_Value::CJS_Value(v8::Isolate* isolate, v8::Handle<v8::Value> pValue,FXJSVALU
ETYPE t) : |
| 18 » m_pValue(pValue), m_eType(t), m_isolate(isolate) |
18 { | 19 { |
19 } | 20 } |
20 | 21 |
21 CJS_Value::CJS_Value(v8::Isolate* isolate, const int &iValue):m_isolate(isolate) | 22 CJS_Value::CJS_Value(v8::Isolate* isolate, const int &iValue):m_isolate(isolate) |
22 { | 23 { |
23 operator =(iValue); | 24 operator =(iValue); |
24 } | 25 } |
25 | 26 |
26 CJS_Value::CJS_Value(v8::Isolate* isolate, const bool &bValue):m_isolate(isolate
) | 27 CJS_Value::CJS_Value(v8::Isolate* isolate, const bool &bValue):m_isolate(isolate
) |
27 { | 28 { |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 return 0.0; | 635 return 0.0; |
635 return JS_ToNumber(m_pDate); | 636 return JS_ToNumber(m_pDate); |
636 } | 637 } |
637 | 638 |
638 CFX_WideString CJS_Date::ToString() const | 639 CFX_WideString CJS_Date::ToString() const |
639 { | 640 { |
640 if(m_pDate.IsEmpty()) | 641 if(m_pDate.IsEmpty()) |
641 return L""; | 642 return L""; |
642 return JS_ToString(m_pDate); | 643 return JS_ToString(m_pDate); |
643 } | 644 } |
OLD | NEW |