summaryrefslogtreecommitdiff
path: root/fxjs/cjs_color.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_color.cpp')
-rw-r--r--fxjs/cjs_color.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/fxjs/cjs_color.cpp b/fxjs/cjs_color.cpp
index cfef4493b3..35747f91dc 100644
--- a/fxjs/cjs_color.cpp
+++ b/fxjs/cjs_color.cpp
@@ -36,11 +36,15 @@ int CJS_Color::ObjDefnID = -1;
// static
void CJS_Color::DefineJSObjects(CFXJS_Engine* pEngine) {
ObjDefnID = pEngine->DefineObj("color", FXJSOBJTYPE_STATIC,
- JSConstructor<CJS_Color, color>, JSDestructor);
+ JSConstructor<CJS_Color>, JSDestructor);
DefineProps(pEngine, ObjDefnID, PropertySpecs, FX_ArraySize(PropertySpecs));
DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs));
}
+CJS_Color::CJS_Color(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {
+ m_pEmbedObj = pdfium::MakeUnique<color>(this);
+}
+
// static
v8::Local<v8::Array> color::ConvertPWLColorToArray(CJS_Runtime* pRuntime,
const CFX_Color& color) {