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/IJavaScript.h" | 7 #include "../../include/javascript/IJavaScript.h" |
8 #include "../../include/javascript/JS_Context.h" | 8 #include "../../include/javascript/JS_Context.h" |
9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
10 #include "../../include/javascript/JS_EventHandler.h" | 10 #include "../../include/javascript/JS_EventHandler.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 ASSERT(pGlobal != NULL); | 100 ASSERT(pGlobal != NULL); |
101 | 101 |
102 pGlobal->Initial(pContext->GetReaderApp()); | 102 pGlobal->Initial(pContext->GetReaderApp()); |
103 | 103 |
104 return TRUE; | 104 return TRUE; |
105 }; | 105 }; |
106 | 106 |
107 global_alternate::global_alternate(CJS_Object* pJSObject) | 107 global_alternate::global_alternate(CJS_Object* pJSObject) |
108 : CJS_EmbedObj(pJSObject), m_pApp(NULL) {} | 108 : CJS_EmbedObj(pJSObject), m_pApp(NULL) {} |
109 | 109 |
110 global_alternate::~global_alternate(void) { | 110 global_alternate::~global_alternate() { |
111 DestroyGlobalPersisitentVariables(); | 111 DestroyGlobalPersisitentVariables(); |
112 CPDFXFA_App::GetInstance()->GetRuntimeFactory()->ReleaseGlobalData(); | 112 CPDFXFA_App::GetInstance()->GetRuntimeFactory()->ReleaseGlobalData(); |
113 } | 113 } |
114 | 114 |
115 void global_alternate::Initial(CPDFDoc_Environment* pApp) { | 115 void global_alternate::Initial(CPDFDoc_Environment* pApp) { |
116 m_pApp = pApp; | 116 m_pApp = pApp; |
117 m_pGlobalData = | 117 m_pGlobalData = |
118 CPDFXFA_App::GetInstance()->GetRuntimeFactory()->NewGlobalData(pApp); | 118 CPDFXFA_App::GetInstance()->GetRuntimeFactory()->NewGlobalData(pApp); |
119 UpdateGlobalPersistentVariables(); | 119 UpdateGlobalPersistentVariables(); |
120 } | 120 } |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 return VT_boolean; | 560 return VT_boolean; |
561 if (nHash == JSCONST_nDateHash) | 561 if (nHash == JSCONST_nDateHash) |
562 return VT_date; | 562 return VT_date; |
563 if (nHash == JSCONST_nObjectHash) | 563 if (nHash == JSCONST_nObjectHash) |
564 return VT_object; | 564 return VT_object; |
565 if (nHash == JSCONST_nFXobjHash) | 565 if (nHash == JSCONST_nFXobjHash) |
566 return VT_fxobject; | 566 return VT_fxobject; |
567 | 567 |
568 return VT_unknown; | 568 return VT_unknown; |
569 } | 569 } |
OLD | NEW |