summaryrefslogtreecommitdiff
path: root/fxjs/cjs_global.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_global.cpp')
-rw-r--r--fxjs/cjs_global.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/fxjs/cjs_global.cpp b/fxjs/cjs_global.cpp
index 0326516f1b..8816cf1b07 100644
--- a/fxjs/cjs_global.cpp
+++ b/fxjs/cjs_global.cpp
@@ -222,12 +222,15 @@ void CJS_Global::DefineAllProperties(CFXJS_Engine* pEngine) {
// static
void CJS_Global::DefineJSObjects(CFXJS_Engine* pEngine) {
ObjDefnID = pEngine->DefineObj("global", FXJSOBJTYPE_STATIC,
- JSConstructor<CJS_Global, JSGlobalAlternate>,
- JSDestructor);
+ JSConstructor<CJS_Global>, JSDestructor);
DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs));
DefineAllProperties(pEngine);
}
+CJS_Global::CJS_Global(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {
+ m_pEmbedObj = pdfium::MakeUnique<JSGlobalAlternate>(this);
+}
+
void CJS_Global::InitInstance(IJS_Runtime* pIRuntime) {
CJS_Runtime* pRuntime = static_cast<CJS_Runtime*>(pIRuntime);
JSGlobalAlternate* pGlobal =