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
diff --git a/testing/js_embedder_test.cpp b/testing/js_embedder_test.cpp
index f7aa7e3..125d2bf 100644
--- a/testing/js_embedder_test.cpp
+++ b/testing/js_embedder_test.cpp
@@ -21,8 +21,7 @@
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();
}