Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: fxjs/cfxjse_runtimedata.cpp

Issue 2471353002: Remove FX_BOOL entirely. (Closed)
Patch Set: Fix nits now rather than later Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fxjs/cfxjse_context.cpp ('k') | fxjs/cfxjse_value.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "fxjs/cfxjse_runtimedata.h" 7 #include "fxjs/cfxjse_runtimedata.h"
8 8
9 #include "fxjs/cfxjse_isolatetracker.h" 9 #include "fxjs/cfxjse_isolatetracker.h"
10 #include "fxjs/fxjs_v8.h" 10 #include "fxjs/fxjs_v8.h"
(...skipping 18 matching lines...) Expand all
29 void KillV8() { 29 void KillV8() {
30 v8::V8::Dispose(); 30 v8::V8::Dispose();
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 void FXJSE_Initialize() { 35 void FXJSE_Initialize() {
36 if (!CFXJSE_IsolateTracker::g_pInstance) 36 if (!CFXJSE_IsolateTracker::g_pInstance)
37 CFXJSE_IsolateTracker::g_pInstance = new CFXJSE_IsolateTracker; 37 CFXJSE_IsolateTracker::g_pInstance = new CFXJSE_IsolateTracker;
38 38
39 static FX_BOOL bV8Initialized = FALSE; 39 static bool bV8Initialized = false;
40 if (bV8Initialized) 40 if (bV8Initialized)
41 return; 41 return;
42 42
43 bV8Initialized = TRUE; 43 bV8Initialized = true;
44 atexit(KillV8); 44 atexit(KillV8);
45 } 45 }
46 46
47 void FXJSE_Finalize() { 47 void FXJSE_Finalize() {
48 if (!CFXJSE_IsolateTracker::g_pInstance) 48 if (!CFXJSE_IsolateTracker::g_pInstance)
49 return; 49 return;
50 50
51 CFXJSE_IsolateTracker::g_pInstance->RemoveAll(Runtime_DisposeCallback); 51 CFXJSE_IsolateTracker::g_pInstance->RemoveAll(Runtime_DisposeCallback);
52 delete CFXJSE_IsolateTracker::g_pInstance; 52 delete CFXJSE_IsolateTracker::g_pInstance;
53 CFXJSE_IsolateTracker::g_pInstance = nullptr; 53 CFXJSE_IsolateTracker::g_pInstance = nullptr;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 CFXJSE_RuntimeData* CFXJSE_RuntimeData::Get(v8::Isolate* pIsolate) { 99 CFXJSE_RuntimeData* CFXJSE_RuntimeData::Get(v8::Isolate* pIsolate) {
100 FXJS_PerIsolateData::SetUp(pIsolate); 100 FXJS_PerIsolateData::SetUp(pIsolate);
101 FXJS_PerIsolateData* pData = FXJS_PerIsolateData::Get(pIsolate); 101 FXJS_PerIsolateData* pData = FXJS_PerIsolateData::Get(pIsolate);
102 if (!pData->m_pFXJSERuntimeData) 102 if (!pData->m_pFXJSERuntimeData)
103 pData->m_pFXJSERuntimeData = CFXJSE_RuntimeData::Create(pIsolate); 103 pData->m_pFXJSERuntimeData = CFXJSE_RuntimeData::Create(pIsolate);
104 return pData->m_pFXJSERuntimeData.get(); 104 return pData->m_pFXJSERuntimeData.get();
105 } 105 }
106 106
107 CFXJSE_IsolateTracker* CFXJSE_IsolateTracker::g_pInstance = nullptr; 107 CFXJSE_IsolateTracker* CFXJSE_IsolateTracker::g_pInstance = nullptr;
OLDNEW
« no previous file with comments | « fxjs/cfxjse_context.cpp ('k') | fxjs/cfxjse_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698