summaryrefslogtreecommitdiff
path: root/testing
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 /testing
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 'testing')
-rw-r--r--testing/js_embedder_test.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/testing/js_embedder_test.cpp b/testing/js_embedder_test.cpp
index f7aa7e38f7..125d2bff3e 100644
--- a/testing/js_embedder_test.cpp
+++ b/testing/js_embedder_test.cpp
@@ -21,8 +21,7 @@ void JSEmbedderTest::SetUp() {
v8::Isolate::Scope isolate_scope(m_pIsolate);
v8::HandleScope handle_scope(m_pIsolate);
FXJS_PerIsolateData::SetUp(m_pIsolate);
- m_Engine.reset(new CFXJS_Engine);
- m_Engine->SetIsolate(m_pIsolate);
+ m_Engine.reset(new CFXJS_Engine(m_pIsolate));
m_Engine->InitializeEngine();
}