summaryrefslogtreecommitdiff
path: root/fxjs/fxjs_v8.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-09-21 11:50:43 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-21 11:50:43 -0700
commit0b2a9874bddf44b4226fcbafa9ce159a9b3735a8 (patch)
treeddd52af69935f9c5480386dfbfbc923c03b6e71e /fxjs/fxjs_v8.cpp
parent54be7be992f1cde40b9d5c0e55a119c6cc4e4e02 (diff)
downloadpdfium-0b2a9874bddf44b4226fcbafa9ce159a9b3735a8.tar.xz
Set up isolate in CFXJS_Engine's constructor
CFXJS_Engine class should always be constructed with an isolate, except for its subclasses which may need to create an isolate by themselves. Move SetIsolate() function to be protected so that only subclasses can access it. Review-Url: https://codereview.chromium.org/2354353002
Diffstat (limited to 'fxjs/fxjs_v8.cpp')
-rw-r--r--fxjs/fxjs_v8.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp
index 5304254242..ebe38fdb7f 100644
--- a/fxjs/fxjs_v8.cpp
+++ b/fxjs/fxjs_v8.cpp
@@ -219,6 +219,8 @@ FXJS_PerIsolateData::FXJS_PerIsolateData() : m_pDynamicObjsMap(nullptr) {}
CFXJS_Engine::CFXJS_Engine() : m_isolate(nullptr) {}
+CFXJS_Engine::CFXJS_Engine(v8::Isolate* pIsolate) : m_isolate(pIsolate) {}
+
CFXJS_Engine::~CFXJS_Engine() {
m_V8PersistentContext.Reset();
}