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/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
9 #include "../../include/javascript/JS_EventHandler.h" | 9 #include "../../include/javascript/JS_EventHandler.h" |
10 #include "../../include/javascript/JS_Runtime.h" | 10 #include "../../include/javascript/JS_Runtime.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 { | 58 { |
59 JS_Release(); | 59 JS_Release(); |
60 ReleaseGlobalData(); | 60 ReleaseGlobalData(); |
61 m_bInit = FALSE; | 61 m_bInit = FALSE; |
62 } | 62 } |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 void CJS_RuntimeFactory::Dele
teJSRuntime(IFXJS_Runtime* pRuntime) | 66 void CJS_RuntimeFactory::Dele
teJSRuntime(IFXJS_Runtime* pRuntime) |
67 { | 67 { |
68 » if(pRuntime) | 68 delete (CJS_Runtime*)pRuntime; |
69 » » delete (CJS_Runtime*)pRuntime; | |
70 } | 69 } |
71 | 70 |
72 CJS_GlobalData* CJS_RuntimeFactory::NewGlobalData(CPDFDoc_Environment* pApp) | 71 CJS_GlobalData* CJS_RuntimeFactory::NewGlobalData(CPDFDoc_Environment* pApp) |
73 { | 72 { |
74 if (m_pGlobalData) | 73 if (m_pGlobalData) |
75 { | 74 { |
76 m_nGlobalDataCount++; | 75 m_nGlobalDataCount++; |
77 return m_pGlobalData; | 76 return m_pGlobalData; |
78 } | 77 } |
79 else | 78 else |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 { | 341 { |
343 return v8::Local<v8::Context>::New(m_isolate, m_context); | 342 return v8::Local<v8::Context>::New(m_isolate, m_context); |
344 } | 343 } |
345 | 344 |
346 CFX_WideString ChangeObjName(const CFX_WideString& str) | 345 CFX_WideString ChangeObjName(const CFX_WideString& str) |
347 { | 346 { |
348 CFX_WideString sRet = str; | 347 CFX_WideString sRet = str; |
349 sRet.Replace(L"_", L"."); | 348 sRet.Replace(L"_", L"."); |
350 return sRet; | 349 return sRet; |
351 } | 350 } |
OLD | NEW |