summaryrefslogtreecommitdiff
path: root/fxjs/JS_Define.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-02-05 21:43:19 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-05 21:43:19 +0000
commit998fee395fc8a543968c7db3db9e3cf81dee57fc (patch)
treec11024354ed996cee5cd5d463ab050e1e2c02d5d /fxjs/JS_Define.h
parent0729be26d745e2ea713908eb9040e2be7c40c96b (diff)
downloadpdfium-998fee395fc8a543968c7db3db9e3cf81dee57fc.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/JS_Define.h')
-rw-r--r--fxjs/JS_Define.h3
1 files changed, 1 insertions, 2 deletions
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<v8::Local<v8::Value>> ExpandKeywordParams(
// Rich JS classes provide constants, methods, properties, and the ability
// to construct native object state.
-template <class T, class A>
+template <class T>
static void JSConstructor(CFXJS_Engine* pEngine, v8::Local<v8::Object> obj) {
auto pObj = pdfium::MakeUnique<T>(obj);
- pObj->SetEmbedObject(pdfium::MakeUnique<A>(pObj.get()));
pObj->InitInstance(static_cast<CJS_Runtime*>(pEngine));
pEngine->SetObjectPrivate(obj, std::move(pObj));
}