| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ASSERT(pGlobal != NULL); | 99 ASSERT(pGlobal != NULL); |
| 100 | 100 |
| 101 pGlobal->Initial(pContext->GetReaderApp()); | 101 pGlobal->Initial(pContext->GetReaderApp()); |
| 102 | 102 |
| 103 return TRUE; | 103 return TRUE; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 global_alternate::global_alternate(CJS_Object* pJSObject) | 106 global_alternate::global_alternate(CJS_Object* pJSObject) |
| 107 : CJS_EmbedObj(pJSObject), m_pApp(NULL) {} | 107 : CJS_EmbedObj(pJSObject), m_pApp(NULL) {} |
| 108 | 108 |
| 109 global_alternate::~global_alternate(void) { | 109 global_alternate::~global_alternate() { |
| 110 DestroyGlobalPersisitentVariables(); | 110 DestroyGlobalPersisitentVariables(); |
| 111 m_pApp->GetRuntimeFactory()->ReleaseGlobalData(); | 111 m_pApp->GetRuntimeFactory()->ReleaseGlobalData(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void global_alternate::Initial(CPDFDoc_Environment* pApp) { | 114 void global_alternate::Initial(CPDFDoc_Environment* pApp) { |
| 115 m_pApp = pApp; | 115 m_pApp = pApp; |
| 116 m_pGlobalData = pApp->GetRuntimeFactory()->NewGlobalData(pApp); | 116 m_pGlobalData = pApp->GetRuntimeFactory()->NewGlobalData(pApp); |
| 117 UpdateGlobalPersistentVariables(); | 117 UpdateGlobalPersistentVariables(); |
| 118 } | 118 } |
| 119 | 119 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 return VT_boolean; | 558 return VT_boolean; |
| 559 if (nHash == JSCONST_nDateHash) | 559 if (nHash == JSCONST_nDateHash) |
| 560 return VT_date; | 560 return VT_date; |
| 561 if (nHash == JSCONST_nObjectHash) | 561 if (nHash == JSCONST_nObjectHash) |
| 562 return VT_object; | 562 return VT_object; |
| 563 if (nHash == JSCONST_nFXobjHash) | 563 if (nHash == JSCONST_nFXobjHash) |
| 564 return VT_fxobject; | 564 return VT_fxobject; |
| 565 | 565 |
| 566 return VT_unknown; | 566 return VT_unknown; |
| 567 } | 567 } |
| OLD | NEW |