diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-08 20:43:55 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-08 20:43:55 +0000 |
commit | 83b259e52ce289003b1a88ba6d8d5e2a8ac348fe (patch) | |
tree | badf4f3bc728dba169805133cc01a6992d4f59e5 /fxjs/js_define.h | |
parent | fc615c63d34037896963f636e4b5d9e05efd41de (diff) | |
download | pdfium-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.h | 5 |
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. |