summaryrefslogtreecommitdiff
path: root/fxjs/js_define.h
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/js_define.h
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/js_define.h')
-rw-r--r--fxjs/js_define.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fxjs/js_define.h b/fxjs/js_define.h
index 93dfd49099..0f16749779 100644
--- a/fxjs/js_define.h
+++ b/fxjs/js_define.h
@@ -50,9 +50,8 @@ std::vector<v8::Local<v8::Value>> ExpandKeywordParams(
template <class T>
static void JSConstructor(CFXJS_Engine* pEngine, v8::Local<v8::Object> obj) {
- auto pObj = pdfium::MakeUnique<T>(obj, static_cast<CJS_Runtime*>(pEngine));
- pObj->InitInstance();
- pEngine->SetObjectPrivate(obj, std::move(pObj));
+ pEngine->SetObjectPrivate(
+ obj, pdfium::MakeUnique<T>(obj, static_cast<CJS_Runtime*>(pEngine)));
}
// CJS_Object has vitual dtor, template not required.