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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 delete m_pGlobalData; | 97 delete m_pGlobalData; |
98 m_pGlobalData = NULL; | 98 m_pGlobalData = NULL; |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 /* ------------------------------ CJS_Runtime ------------------------------ */ | 102 /* ------------------------------ CJS_Runtime ------------------------------ */ |
103 | 103 |
104 CJS_Runtime::CJS_Runtime(CPDFDoc_Environment * pApp) : | 104 CJS_Runtime::CJS_Runtime(CPDFDoc_Environment * pApp) : |
105 m_pApp(pApp), | 105 m_pApp(pApp), |
106 m_pDocument(NULL), | 106 m_pDocument(NULL), |
| 107 m_bBlocking(FALSE), |
107 m_pFieldEventPath(NULL), | 108 m_pFieldEventPath(NULL), |
108 m_bBlocking(FALSE), | |
109 m_bRegistered(FALSE) | 109 m_bRegistered(FALSE) |
110 { | 110 { |
111 m_isolate = v8::Isolate::New(); | 111 m_isolate = v8::Isolate::New(); |
112 //m_isolate->Enter(); | 112 //m_isolate->Enter(); |
113 | 113 |
114 InitJSObjects(); | 114 InitJSObjects(); |
115 | 115 |
116 CJS_Context * pContext = (CJS_Context*)NewContext(); | 116 CJS_Context * pContext = (CJS_Context*)NewContext(); |
117 JS_InitialRuntime(*this, this, pContext, m_context); | 117 JS_InitialRuntime(*this, this, pContext, m_context); |
118 ReleaseContext(pContext); | 118 ReleaseContext(pContext); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 return v8::Isolate::GetCurrent() == m_isolate; | 468 return v8::Isolate::GetCurrent() == m_isolate; |
469 } | 469 } |
470 void CJS_Runtime::Exit() | 470 void CJS_Runtime::Exit() |
471 { | 471 { |
472 if(m_isolate) m_isolate->Exit(); | 472 if(m_isolate) m_isolate->Exit(); |
473 } | 473 } |
474 void CJS_Runtime::Enter() | 474 void CJS_Runtime::Enter() |
475 { | 475 { |
476 if(m_isolate) m_isolate->Enter(); | 476 if(m_isolate) m_isolate->Enter(); |
477 } | 477 } |
OLD | NEW |