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 "fpdfsdk/javascript/JS_Value.h" | 7 #include "fpdfsdk/javascript/JS_Value.h" |
8 | 8 |
9 #include <time.h> | 9 #include <time.h> |
10 | 10 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 FX_BOOL CJS_Value::ConvertToDate(CJS_Date& date) const { | 276 FX_BOOL CJS_Value::ConvertToDate(CJS_Date& date) const { |
277 if (IsDateObject()) { | 277 if (IsDateObject()) { |
278 date.Attach(m_pValue); | 278 date.Attach(m_pValue); |
279 return TRUE; | 279 return TRUE; |
280 } | 280 } |
281 | 281 |
282 return FALSE; | 282 return FALSE; |
283 } | 283 } |
284 | 284 |
285 /* ---------------------------- CJS_PropValue ---------------------------- */ | |
286 | |
287 CJS_PropValue::CJS_PropValue(const CJS_Value& value) | 285 CJS_PropValue::CJS_PropValue(const CJS_Value& value) |
288 : CJS_Value(value), m_bIsSetting(0) {} | 286 : CJS_Value(value), m_bIsSetting(0) {} |
289 | 287 |
290 CJS_PropValue::CJS_PropValue(CJS_Runtime* pRuntime) | 288 CJS_PropValue::CJS_PropValue(CJS_Runtime* pRuntime) |
291 : CJS_Value(pRuntime), m_bIsSetting(0) {} | 289 : CJS_Value(pRuntime), m_bIsSetting(0) {} |
292 | 290 |
293 CJS_PropValue::~CJS_PropValue() {} | 291 CJS_PropValue::~CJS_PropValue() {} |
294 | 292 |
295 void CJS_PropValue::operator<<(int iValue) { | 293 void CJS_PropValue::operator<<(int iValue) { |
296 ASSERT(!m_bIsSetting); | 294 ASSERT(!m_bIsSetting); |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 for (size_t i = 0; i < nKeywords; ++i) { | 894 for (size_t i = 0; i < nKeywords; ++i) { |
897 const wchar_t* property = va_arg(ap, const wchar_t*); | 895 const wchar_t* property = va_arg(ap, const wchar_t*); |
898 v8::Local<v8::Value> v8Value = | 896 v8::Local<v8::Value> v8Value = |
899 FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); | 897 FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); |
900 if (!v8Value->IsUndefined()) | 898 if (!v8Value->IsUndefined()) |
901 result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); | 899 result[i] = CJS_Value(pRuntime, v8Value, CJS_Value::VT_unknown); |
902 } | 900 } |
903 va_end(ap); | 901 va_end(ap); |
904 return result; | 902 return result; |
905 } | 903 } |
OLD | NEW |