summaryrefslogtreecommitdiff
path: root/fxjs/cjs_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_document.cpp')
-rw-r--r--fxjs/cjs_document.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/fxjs/cjs_document.cpp b/fxjs/cjs_document.cpp
index 980edd990a..e513ba0159 100644
--- a/fxjs/cjs_document.cpp
+++ b/fxjs/cjs_document.cpp
@@ -116,9 +116,9 @@ int CJS_Document::GetObjDefnID() {
// static
void CJS_Document::DefineJSObjects(CFXJS_Engine* pEngine) {
- ObjDefnID = pEngine->DefineObj("Document", FXJSOBJTYPE_GLOBAL,
- JSConstructor<CJS_Document, Document>,
- JSDestructor<CJS_Document>);
+ ObjDefnID =
+ pEngine->DefineObj("Document", FXJSOBJTYPE_GLOBAL,
+ JSConstructor<CJS_Document, Document>, JSDestructor);
DefineProps(pEngine, ObjDefnID, PropertySpecs, FX_ArraySize(PropertySpecs));
DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs));
}
@@ -362,8 +362,7 @@ CJS_Return Document::print(CJS_Runtime* pRuntime,
if (CFXJS_Engine::GetObjDefnID(pObj) ==
CJS_PrintParamsObj::GetObjDefnID()) {
v8::Local<v8::Object> pObj = pRuntime->ToObject(params[8]);
- CJS_Object* pJSObj =
- static_cast<CJS_Object*>(pRuntime->GetObjectPrivate(pObj));
+ CJS_Object* pJSObj = pRuntime->GetObjectPrivate(pObj);
if (pJSObj) {
if (PrintParamsObj* pprintparamsObj =
static_cast<PrintParamsObj*>(pJSObj->GetEmbedObject())) {
@@ -1113,7 +1112,7 @@ CJS_Return Document::addIcon(CJS_Runtime* pRuntime,
return CJS_Return(JSGetStringFromID(JSMessage::kTypeError));
v8::Local<v8::Object> pObj = pRuntime->ToObject(params[1]);
- CJS_Object* obj = static_cast<CJS_Object*>(pRuntime->GetObjectPrivate(pObj));
+ CJS_Object* obj = pRuntime->GetObjectPrivate(pObj);
if (!obj->GetEmbedObject())
return CJS_Return(JSGetStringFromID(JSMessage::kTypeError));