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

Unified Diff: fxjs/include/fxjs_v8.h

Issue 2354353002: Set up isolate in CFXJS_Engine's constructor (Closed)
Patch Set: Created 4 years, 3 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 | « fxjs/fxjs_v8_embeddertest.cpp ('k') | testing/js_embedder_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fxjs/include/fxjs_v8.h
diff --git a/fxjs/include/fxjs_v8.h b/fxjs/include/fxjs_v8.h
index c08cc8b7ad28f996f5ea81a97810b20d96cff3f8..8b5fc8399aee9e34e126343cc3de465b91c520f5 100644
--- a/fxjs/include/fxjs_v8.h
+++ b/fxjs/include/fxjs_v8.h
@@ -138,7 +138,7 @@ size_t FXJS_GlobalIsolateRefCount();
class CFXJS_Engine {
public:
- CFXJS_Engine();
+ explicit CFXJS_Engine(v8::Isolate* pIsolate);
~CFXJS_Engine();
using Constructor = void (*)(CFXJS_Engine* pEngine,
@@ -155,8 +155,6 @@ class CFXJS_Engine {
CFXJS_Engine* pEngine);
#endif // PDF_ENABLE_XFA
- // TODO(tsepez): to constructor.
- void SetIsolate(v8::Isolate* pIsolate) { m_isolate = pIsolate; }
v8::Isolate* GetIsolate() const { return m_isolate; }
// Always returns a valid, newly-created objDefnID.
@@ -258,6 +256,11 @@ class CFXJS_Engine {
v8::Local<v8::String> WSToJSString(const CFX_WideString& wsPropertyName);
void Error(const CFX_WideString& message);
+ protected:
+ CFXJS_Engine();
+
+ void SetIsolate(v8::Isolate* pIsolate) { m_isolate = pIsolate; }
+
private:
v8::Isolate* m_isolate;
v8::Global<v8::Context> m_V8PersistentContext;
« no previous file with comments | « fxjs/fxjs_v8_embeddertest.cpp ('k') | testing/js_embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698