Index: xfa/fxjse/runtime.h |
diff --git a/xfa/fxjse/runtime.h b/xfa/fxjse/runtime.h |
index 1240089be40e512e60756538255df2c4bdc80597..b57efe1df7831dc134942249257984d8b39b4ab1 100644 |
--- a/xfa/fxjse/runtime.h |
+++ b/xfa/fxjse/runtime.h |
@@ -15,39 +15,32 @@ |
class CFXJSE_RuntimeList; |
class CFXJSE_RuntimeData { |
- protected: |
- CFXJSE_RuntimeData(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {} |
- |
public: |
- static CFXJSE_RuntimeData* Create(v8::Isolate* pIsolate); |
static CFXJSE_RuntimeData* Get(v8::Isolate* pIsolate); |
- public: |
v8::Isolate* m_pIsolate; |
v8::Global<v8::FunctionTemplate> m_hRootContextGlobalTemplate; |
v8::Global<v8::Context> m_hRootContext; |
- public: |
- static CFXJSE_RuntimeList* g_RuntimeList; |
- |
protected: |
+ static CFXJSE_RuntimeData* Create(v8::Isolate* pIsolate); |
+ CFXJSE_RuntimeData(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {} |
CFXJSE_RuntimeData(); |
CFXJSE_RuntimeData(const CFXJSE_RuntimeData&); |
CFXJSE_RuntimeData& operator=(const CFXJSE_RuntimeData&); |
}; |
-class CFXJSE_RuntimeList { |
+class CFXJSE_IsolateTracker { |
public: |
- typedef void (*RuntimeDisposeCallback)(v8::Isolate*); |
+ typedef void (*DisposeCallback)(v8::Isolate*, bool bOwnedIsolate); |
+ static CFXJSE_IsolateTracker* g_pInstance; |
- public: |
- void AppendRuntime(v8::Isolate* pIsolate); |
- void RemoveRuntime(v8::Isolate* pIsolate, |
- RuntimeDisposeCallback lpfnDisposeCallback); |
- void RemoveAllRuntimes(RuntimeDisposeCallback lpfnDisposeCallback); |
+ void Append(v8::Isolate* pIsolate); |
+ void Remove(v8::Isolate* pIsolate, DisposeCallback lpfnDisposeCallback); |
+ void RemoveAll(DisposeCallback lpfnDisposeCallback); |
protected: |
- std::vector<v8::Isolate*> m_RuntimeList; |
+ std::vector<v8::Isolate*> m_OwnedIsolates; |
}; |
#endif // XFA_FXJSE_RUNTIME_H_ |