From 998fee395fc8a543968c7db3db9e3cf81dee57fc Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 5 Feb 2018 21:43:19 +0000 Subject: Remove the CJS_EmbedObj template param from JSConstructor. Each of the CJS_Objects can create their CJS_EmbedObj's internally and we don't need to do it though the JSConstructor. This also removes the need for the SetEmbedObj method in CJS_Object. Change-Id: Ib0535ad922b370634fd1e622a04860a96c4f2825 Reviewed-on: https://pdfium-review.googlesource.com/25370 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fxjs/JS_Define.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fxjs/JS_Define.h') diff --git a/fxjs/JS_Define.h b/fxjs/JS_Define.h index 1c2410f18f..540746afd5 100644 --- a/fxjs/JS_Define.h +++ b/fxjs/JS_Define.h @@ -48,10 +48,9 @@ std::vector> ExpandKeywordParams( // Rich JS classes provide constants, methods, properties, and the ability // to construct native object state. -template +template static void JSConstructor(CFXJS_Engine* pEngine, v8::Local obj) { auto pObj = pdfium::MakeUnique(obj); - pObj->SetEmbedObject(pdfium::MakeUnique(pObj.get())); pObj->InitInstance(static_cast(pEngine)); pEngine->SetObjectPrivate(obj, std::move(pObj)); } -- cgit v1.2.3