summaryrefslogtreecommitdiff
path: root/fxjs/cjs_annot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_annot.cpp')
-rw-r--r--fxjs/cjs_annot.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/fxjs/cjs_annot.cpp b/fxjs/cjs_annot.cpp
index 100fa20cd4..34084a9091 100644
--- a/fxjs/cjs_annot.cpp
+++ b/fxjs/cjs_annot.cpp
@@ -34,13 +34,17 @@ int CJS_Annot::GetObjDefnID() {
// static
void CJS_Annot::DefineJSObjects(CFXJS_Engine* pEngine) {
ObjDefnID = pEngine->DefineObj("Annot", FXJSOBJTYPE_DYNAMIC,
- JSConstructor<CJS_Annot, Annot>, JSDestructor);
+ JSConstructor<CJS_Annot>, JSDestructor);
DefineProps(pEngine, ObjDefnID, PropertySpecs, FX_ArraySize(PropertySpecs));
}
+CJS_Annot::CJS_Annot(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {
+ m_pEmbedObj = pdfium::MakeUnique<Annot>(this);
+}
+
Annot::Annot(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
-Annot::~Annot() {}
+Annot::~Annot() = default;
CJS_Return Annot::get_hidden(CJS_Runtime* pRuntime) {
if (!m_pAnnot)