summaryrefslogtreecommitdiff
path: root/fxjs/cjs_timerobj.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_timerobj.cpp')
-rw-r--r--fxjs/cjs_timerobj.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/fxjs/cjs_timerobj.cpp b/fxjs/cjs_timerobj.cpp
index d892e0b3ee..172ee5c04e 100644
--- a/fxjs/cjs_timerobj.cpp
+++ b/fxjs/cjs_timerobj.cpp
@@ -17,15 +17,19 @@ int CJS_TimerObj::GetObjDefnID() {
// static
void CJS_TimerObj::DefineJSObjects(CFXJS_Engine* pEngine) {
- ObjDefnID =
- pEngine->DefineObj("TimerObj", FXJSOBJTYPE_DYNAMIC,
- JSConstructor<CJS_TimerObj, TimerObj>, JSDestructor);
+ ObjDefnID = pEngine->DefineObj("TimerObj", FXJSOBJTYPE_DYNAMIC,
+ JSConstructor<CJS_TimerObj>, JSDestructor);
+}
+
+CJS_TimerObj::CJS_TimerObj(v8::Local<v8::Object> pObject)
+ : CJS_Object(pObject) {
+ m_pEmbedObj = pdfium::MakeUnique<TimerObj>(this);
}
TimerObj::TimerObj(CJS_Object* pJSObject)
: CJS_EmbedObj(pJSObject), m_nTimerID(0) {}
-TimerObj::~TimerObj() {}
+TimerObj::~TimerObj() = default;
void TimerObj::SetTimer(GlobalTimer* pTimer) {
m_nTimerID = pTimer->GetTimerID();