summaryrefslogtreecommitdiff
path: root/fxjs/cjs_global.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-08 20:43:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-08 20:43:55 +0000
commit83b259e52ce289003b1a88ba6d8d5e2a8ac348fe (patch)
treebadf4f3bc728dba169805133cc01a6992d4f59e5 /fxjs/cjs_global.cpp
parentfc615c63d34037896963f636e4b5d9e05efd41de (diff)
downloadpdfium-83b259e52ce289003b1a88ba6d8d5e2a8ac348fe.tar.xz
Remove CJS_Object::InitInstance().
Because constructors can do all this. Change-Id: I4f7ff6c26b17d9bddd326333a66e1bd38b2ea377 Reviewed-on: https://pdfium-review.googlesource.com/34693 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjs_global.cpp')
-rw-r--r--fxjs/cjs_global.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fxjs/cjs_global.cpp b/fxjs/cjs_global.cpp
index 5d5bc3ccf0..ffa30a54a8 100644
--- a/fxjs/cjs_global.cpp
+++ b/fxjs/cjs_global.cpp
@@ -200,17 +200,15 @@ void CJS_Global::DefineJSObjects(CFXJS_Engine* pEngine) {
}
CJS_Global::CJS_Global(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime)
- : CJS_Object(pObject, pRuntime) {}
+ : CJS_Object(pObject, pRuntime) {
+ Initial(GetRuntime()->GetFormFillEnv());
+}
CJS_Global::~CJS_Global() {
DestroyGlobalPersisitentVariables();
m_pGlobalData->Release();
}
-void CJS_Global::InitInstance() {
- Initial(GetRuntime()->GetFormFillEnv());
-}
-
void CJS_Global::Initial(CPDFSDK_FormFillEnvironment* pFormFillEnv) {
m_pFormFillEnv.Reset(pFormFillEnv);
m_pGlobalData = CJS_GlobalData::GetRetainedInstance(pFormFillEnv);