summaryrefslogtreecommitdiff
path: root/fxjs/cjs_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_util.cpp')
-rw-r--r--fxjs/cjs_util.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/fxjs/cjs_util.cpp b/fxjs/cjs_util.cpp
index b161ec73fd..db03dbdb82 100644
--- a/fxjs/cjs_util.cpp
+++ b/fxjs/cjs_util.cpp
@@ -69,13 +69,17 @@ int CJS_Util::ObjDefnID = -1;
// static
void CJS_Util::DefineJSObjects(CFXJS_Engine* pEngine) {
ObjDefnID = pEngine->DefineObj("util", FXJSOBJTYPE_STATIC,
- JSConstructor<CJS_Util, util>, JSDestructor);
+ JSConstructor<CJS_Util>, JSDestructor);
DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs));
}
+CJS_Util::CJS_Util(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {
+ m_pEmbedObj = pdfium::MakeUnique<util>(this);
+}
+
util::util(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
-util::~util() {}
+util::~util() = default;
CJS_Return util::printf(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {