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 "xfa/src/fxjse/context.h" | 7 #include "xfa/fxjse/context.h" |
8 | 8 |
9 #include "xfa/src/fxjse/class.h" | 9 #include "xfa/fxjse/class.h" |
10 #include "xfa/src/fxjse/scope_inline.h" | 10 #include "xfa/fxjse/scope_inline.h" |
11 #include "xfa/src/fxjse/util_inline.h" | 11 #include "xfa/fxjse/util_inline.h" |
12 #include "xfa/src/fxjse/value.h" | 12 #include "xfa/fxjse/value.h" |
13 | 13 |
14 FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, | 14 FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, |
15 const FXJSE_CLASS* lpGlobalClass, | 15 const FXJSE_CLASS* lpGlobalClass, |
16 void* lpGlobalObject) { | 16 void* lpGlobalObject) { |
17 CFXJSE_Context* pContext = CFXJSE_Context::Create( | 17 CFXJSE_Context* pContext = CFXJSE_Context::Create( |
18 reinterpret_cast<v8::Isolate*>(hRuntime), lpGlobalClass, lpGlobalObject); | 18 reinterpret_cast<v8::Isolate*>(hRuntime), lpGlobalClass, lpGlobalObject); |
19 return reinterpret_cast<FXJSE_HCONTEXT>(pContext); | 19 return reinterpret_cast<FXJSE_HCONTEXT>(pContext); |
20 } | 20 } |
21 | 21 |
22 void FXJSE_Context_Release(FXJSE_HCONTEXT hContext) { | 22 void FXJSE_Context_Release(FXJSE_HCONTEXT hContext) { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 return TRUE; | 266 return TRUE; |
267 } | 267 } |
268 } | 268 } |
269 if (lpRetValue) { | 269 if (lpRetValue) { |
270 lpRetValue->m_hValue.Reset(m_pIsolate, | 270 lpRetValue->m_hValue.Reset(m_pIsolate, |
271 FXJSE_CreateReturnValue(m_pIsolate, trycatch)); | 271 FXJSE_CreateReturnValue(m_pIsolate, trycatch)); |
272 } | 272 } |
273 return FALSE; | 273 return FALSE; |
274 } | 274 } |
275 } | 275 } |
OLD | NEW |