OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "fxjs/include/cfxjse_arguments.h" | 7 #include "fxjs/cfxjse_arguments.h" |
8 | 8 |
9 #include "fxjs/include/cfxjse_context.h" | 9 #include "fxjs/cfxjse_context.h" |
10 #include "fxjs/include/cfxjse_value.h" | 10 #include "fxjs/cfxjse_value.h" |
11 | 11 |
12 v8::Isolate* CFXJSE_Arguments::GetRuntime() const { | 12 v8::Isolate* CFXJSE_Arguments::GetRuntime() const { |
13 return m_pRetValue->GetIsolate(); | 13 return m_pRetValue->GetIsolate(); |
14 } | 14 } |
15 | 15 |
16 int32_t CFXJSE_Arguments::GetLength() const { | 16 int32_t CFXJSE_Arguments::GetLength() const { |
17 return m_pInfo->Length(); | 17 return m_pInfo->Length(); |
18 } | 18 } |
19 | 19 |
20 std::unique_ptr<CFXJSE_Value> CFXJSE_Arguments::GetValue(int32_t index) const { | 20 std::unique_ptr<CFXJSE_Value> CFXJSE_Arguments::GetValue(int32_t index) const { |
(...skipping 26 matching lines...) Expand all Loading... |
47 v8::Local<v8::Value> hValue = (*m_pInfo)[index]; | 47 v8::Local<v8::Value> hValue = (*m_pInfo)[index]; |
48 ASSERT(!hValue.IsEmpty()); | 48 ASSERT(!hValue.IsEmpty()); |
49 if (!hValue->IsObject()) | 49 if (!hValue->IsObject()) |
50 return nullptr; | 50 return nullptr; |
51 return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>(), pClass); | 51 return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>(), pClass); |
52 } | 52 } |
53 | 53 |
54 CFXJSE_Value* CFXJSE_Arguments::GetReturnValue() { | 54 CFXJSE_Value* CFXJSE_Arguments::GetReturnValue() { |
55 return m_pRetValue; | 55 return m_pRetValue; |
56 } | 56 } |
OLD | NEW |