summaryrefslogtreecommitdiff
path: root/fxjs/cjs_icon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_icon.cpp')
-rw-r--r--fxjs/cjs_icon.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/fxjs/cjs_icon.cpp b/fxjs/cjs_icon.cpp
index 9a4b73b2d6..69a6d45557 100644
--- a/fxjs/cjs_icon.cpp
+++ b/fxjs/cjs_icon.cpp
@@ -19,14 +19,18 @@ int CJS_Icon::GetObjDefnID() {
// static
void CJS_Icon::DefineJSObjects(CFXJS_Engine* pEngine) {
ObjDefnID = pEngine->DefineObj("Icon", FXJSOBJTYPE_DYNAMIC,
- JSConstructor<CJS_Icon, Icon>, JSDestructor);
+ JSConstructor<CJS_Icon>, JSDestructor);
DefineProps(pEngine, ObjDefnID, PropertySpecs, FX_ArraySize(PropertySpecs));
}
+CJS_Icon::CJS_Icon(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {
+ m_pEmbedObj = pdfium::MakeUnique<Icon>(this);
+}
+
Icon::Icon(CJS_Object* pJSObject)
: CJS_EmbedObj(pJSObject), m_swIconName(L"") {}
-Icon::~Icon() {}
+Icon::~Icon() = default;
CJS_Return Icon::get_name(CJS_Runtime* pRuntime) {
return CJS_Return(pRuntime->NewString(m_swIconName.c_str()));