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

Unified Diff: xfa/fxjse/runtime.h

Issue 2025193002: Track shared isolates better in FXJSE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 4 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxjse/include/fxjse.h ('k') | xfa/fxjse/runtime.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « xfa/fxjse/include/fxjse.h ('k') | xfa/fxjse/runtime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698