summaryrefslogtreecommitdiff
path: root/fxjs/cjs_console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_console.cpp')
-rw-r--r--fxjs/cjs_console.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/fxjs/cjs_console.cpp b/fxjs/cjs_console.cpp
index f4158a9c0a..2b4dd27977 100644
--- a/fxjs/cjs_console.cpp
+++ b/fxjs/cjs_console.cpp
@@ -22,15 +22,18 @@ int CJS_Console::ObjDefnID = -1;
// static
void CJS_Console::DefineJSObjects(CFXJS_Engine* pEngine) {
- ObjDefnID =
- pEngine->DefineObj("console", FXJSOBJTYPE_STATIC,
- JSConstructor<CJS_Console, console>, JSDestructor);
+ ObjDefnID = pEngine->DefineObj("console", FXJSOBJTYPE_STATIC,
+ JSConstructor<CJS_Console>, JSDestructor);
DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs));
}
+CJS_Console::CJS_Console(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {
+ m_pEmbedObj = pdfium::MakeUnique<console>(this);
+}
+
console::console(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
-console::~console() {}
+console::~console() = default;
CJS_Return console::clear(CJS_Runtime* pRuntime,
const std::vector<v8::Local<v8::Value>>& params) {