diff options
Diffstat (limited to 'fpdfsdk')
39 files changed, 106 insertions, 104 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index 02cf82b9b1..d556872477 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -46,10 +46,9 @@ int CJS_PrintParamsObj::GetObjDefnID() { } // static -void CJS_PrintParamsObj::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { +void CJS_PrintParamsObj::DefineJSObjects(CFXJS_Engine* pEngine) { ObjDefnID = - pEngine->DefineObj("PrintParamsObj", eObjType, + pEngine->DefineObj("PrintParamsObj", FXJSOBJTYPE_DYNAMIC, JSConstructor<CJS_PrintParamsObj, PrintParamsObj>, JSDestructor<CJS_PrintParamsObj>); } @@ -159,9 +158,8 @@ int CJS_Document::GetObjDefnID() { } // static -void CJS_Document::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("Document", eObjType, +void CJS_Document::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("Document", FXJSOBJTYPE_GLOBAL, JSConstructor<CJS_Document, Document>, JSDestructor<CJS_Document>); DefineProps(pEngine, ObjDefnID, PropertySpecs); diff --git a/fpdfsdk/javascript/Document.h b/fpdfsdk/javascript/Document.h index 92199838f1..043e6bee62 100644 --- a/fpdfsdk/javascript/Document.h +++ b/fpdfsdk/javascript/Document.h @@ -35,7 +35,7 @@ class PrintParamsObj : public CJS_EmbedObj { class CJS_PrintParamsObj : public CJS_Object { public: static int GetObjDefnID(); - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_PrintParamsObj(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} @@ -268,7 +268,7 @@ class Document : public CJS_EmbedObj { class CJS_Document : public CJS_Object { public: static int GetObjDefnID(); - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Document(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Document() override {} diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp index 2c49859ae1..a3bde1c0c3 100644 --- a/fpdfsdk/javascript/Field.cpp +++ b/fpdfsdk/javascript/Field.cpp @@ -173,10 +173,10 @@ int CJS_Field::GetObjDefnID() { } // static -void CJS_Field::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = - pEngine->DefineObj("Field", eObjType, JSConstructor<CJS_Field, Field>, - JSDestructor<CJS_Field>); +void CJS_Field::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("Field", FXJSOBJTYPE_DYNAMIC, + JSConstructor<CJS_Field, Field>, + JSDestructor<CJS_Field>); DefineProps(pEngine, ObjDefnID, PropertySpecs); DefineMethods(pEngine, ObjDefnID, MethodSpecs); } diff --git a/fpdfsdk/javascript/Field.h b/fpdfsdk/javascript/Field.h index 75a00e69d6..6c16c5eb28 100644 --- a/fpdfsdk/javascript/Field.h +++ b/fpdfsdk/javascript/Field.h @@ -360,7 +360,7 @@ class Field : public CJS_EmbedObj { class CJS_Field : public CJS_Object { public: static int GetObjDefnID(); - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Field() override {} diff --git a/fpdfsdk/javascript/Icon.cpp b/fpdfsdk/javascript/Icon.cpp index e096e3a4ba..df7561ea8b 100644 --- a/fpdfsdk/javascript/Icon.cpp +++ b/fpdfsdk/javascript/Icon.cpp @@ -22,9 +22,10 @@ int CJS_Icon::GetObjDefnID() { } // static -void CJS_Icon::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj( - "Icon", eObjType, JSConstructor<CJS_Icon, Icon>, JSDestructor<CJS_Icon>); +void CJS_Icon::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("Icon", FXJSOBJTYPE_DYNAMIC, + JSConstructor<CJS_Icon, Icon>, JSDestructor<CJS_Icon>); DefineProps(pEngine, ObjDefnID, PropertySpecs); } diff --git a/fpdfsdk/javascript/Icon.h b/fpdfsdk/javascript/Icon.h index fdfb36d0e7..9f6366178d 100644 --- a/fpdfsdk/javascript/Icon.h +++ b/fpdfsdk/javascript/Icon.h @@ -29,7 +29,7 @@ class Icon : public CJS_EmbedObj { class CJS_Icon : public CJS_Object { public: static int GetObjDefnID(); - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Icon(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Icon() override {} diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp index 0c55ee6123..148b71f6dc 100644 --- a/fpdfsdk/javascript/app.cpp +++ b/fpdfsdk/javascript/app.cpp @@ -150,9 +150,8 @@ int CJS_TimerObj::GetObjDefnID() { } // static -void CJS_TimerObj::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("TimerObj", eObjType, +void CJS_TimerObj::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("TimerObj", FXJSOBJTYPE_DYNAMIC, JSConstructor<CJS_TimerObj, TimerObj>, JSDestructor<CJS_TimerObj>); } @@ -220,9 +219,10 @@ const JSMethodSpec CJS_App::MethodSpecs[] = { int CJS_App::ObjDefnID = -1; // static -void CJS_App::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("app", eObjType, JSConstructor<CJS_App, app>, - JSDestructor<CJS_App>); +void CJS_App::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("app", FXJSOBJTYPE_STATIC, JSConstructor<CJS_App, app>, + JSDestructor<CJS_App>); DefineProps(pEngine, ObjDefnID, PropertySpecs); DefineMethods(pEngine, ObjDefnID, MethodSpecs); } diff --git a/fpdfsdk/javascript/app.h b/fpdfsdk/javascript/app.h index 7307a73d97..ea95398c80 100644 --- a/fpdfsdk/javascript/app.h +++ b/fpdfsdk/javascript/app.h @@ -31,7 +31,7 @@ class TimerObj : public CJS_EmbedObj { class CJS_TimerObj : public CJS_Object { public: static int GetObjDefnID(); - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_TimerObj(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_TimerObj() override {} @@ -144,7 +144,7 @@ class app : public CJS_EmbedObj { class CJS_App : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_App(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_App() override {} diff --git a/fpdfsdk/javascript/cjs_annot.cpp b/fpdfsdk/javascript/cjs_annot.cpp index 29601cd4a6..84c8007309 100644 --- a/fpdfsdk/javascript/cjs_annot.cpp +++ b/fpdfsdk/javascript/cjs_annot.cpp @@ -33,10 +33,10 @@ int CJS_Annot::GetObjDefnID() { } // static -void CJS_Annot::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = - pEngine->DefineObj("Annot", eObjType, JSConstructor<CJS_Annot, Annot>, - JSDestructor<CJS_Annot>); +void CJS_Annot::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("Annot", FXJSOBJTYPE_DYNAMIC, + JSConstructor<CJS_Annot, Annot>, + JSDestructor<CJS_Annot>); DefineProps(pEngine, ObjDefnID, PropertySpecs); } diff --git a/fpdfsdk/javascript/cjs_annot.h b/fpdfsdk/javascript/cjs_annot.h index d61b5038c4..966e5835f4 100644 --- a/fpdfsdk/javascript/cjs_annot.h +++ b/fpdfsdk/javascript/cjs_annot.h @@ -33,7 +33,7 @@ class Annot : public CJS_EmbedObj { class CJS_Annot : public CJS_Object { public: static int GetObjDefnID(); - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Annot(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Annot() override {} diff --git a/fpdfsdk/javascript/cjs_border.cpp b/fpdfsdk/javascript/cjs_border.cpp index c1f72cdad9..f418aeec61 100644 --- a/fpdfsdk/javascript/cjs_border.cpp +++ b/fpdfsdk/javascript/cjs_border.cpp @@ -17,7 +17,8 @@ const JSConstSpec CJS_Border::ConstSpecs[] = { int CJS_Border::ObjDefnID = -1; // static -void CJS_Border::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("border", eObjType, nullptr, nullptr); +void CJS_Border::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("border", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_border.h b/fpdfsdk/javascript/cjs_border.h index 732ecd8d85..5a1d6b75f3 100644 --- a/fpdfsdk/javascript/cjs_border.h +++ b/fpdfsdk/javascript/cjs_border.h @@ -11,7 +11,7 @@ class CJS_Border : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Border(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Border() override {} diff --git a/fpdfsdk/javascript/cjs_display.cpp b/fpdfsdk/javascript/cjs_display.cpp index 329675dbc3..391f09005a 100644 --- a/fpdfsdk/javascript/cjs_display.cpp +++ b/fpdfsdk/javascript/cjs_display.cpp @@ -16,7 +16,8 @@ const JSConstSpec CJS_Display::ConstSpecs[] = { int CJS_Display::ObjDefnID = -1; // static -void CJS_Display::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("display", eObjType, nullptr, nullptr); +void CJS_Display::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("display", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_display.h b/fpdfsdk/javascript/cjs_display.h index 53975e6c42..b0f9f70ddf 100644 --- a/fpdfsdk/javascript/cjs_display.h +++ b/fpdfsdk/javascript/cjs_display.h @@ -11,7 +11,7 @@ class CJS_Display : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Display(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Display() override {} diff --git a/fpdfsdk/javascript/cjs_font.cpp b/fpdfsdk/javascript/cjs_font.cpp index 403da400d4..580b115833 100644 --- a/fpdfsdk/javascript/cjs_font.cpp +++ b/fpdfsdk/javascript/cjs_font.cpp @@ -26,7 +26,7 @@ const JSConstSpec CJS_Font::ConstSpecs[] = { int CJS_Font::ObjDefnID = -1; // static -void CJS_Font::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("font", eObjType, nullptr, nullptr); +void CJS_Font::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("font", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_font.h b/fpdfsdk/javascript/cjs_font.h index 680a3e81a2..069410a139 100644 --- a/fpdfsdk/javascript/cjs_font.h +++ b/fpdfsdk/javascript/cjs_font.h @@ -11,7 +11,7 @@ class CJS_Font : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Font(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Font() override {} diff --git a/fpdfsdk/javascript/cjs_global.cpp b/fpdfsdk/javascript/cjs_global.cpp index d38455d8be..658cc86f16 100644 --- a/fpdfsdk/javascript/cjs_global.cpp +++ b/fpdfsdk/javascript/cjs_global.cpp @@ -224,8 +224,8 @@ void CJS_Global::DefineAllProperties(CFXJS_Engine* pEngine) { } // static -void CJS_Global::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("global", eObjType, +void CJS_Global::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("global", FXJSOBJTYPE_STATIC, JSConstructor<CJS_Global, JSGlobalAlternate>, JSDestructor<CJS_Global>); DefineMethods(pEngine, ObjDefnID, MethodSpecs); diff --git a/fpdfsdk/javascript/cjs_global.h b/fpdfsdk/javascript/cjs_global.h index b99b071e9a..ddb67b95c3 100644 --- a/fpdfsdk/javascript/cjs_global.h +++ b/fpdfsdk/javascript/cjs_global.h @@ -11,7 +11,7 @@ class CJS_Global : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); static void DefineAllProperties(CFXJS_Engine* pEngine); static void queryprop_static( diff --git a/fpdfsdk/javascript/cjs_highlight.cpp b/fpdfsdk/javascript/cjs_highlight.cpp index 167e059ed4..bc206afd52 100644 --- a/fpdfsdk/javascript/cjs_highlight.cpp +++ b/fpdfsdk/javascript/cjs_highlight.cpp @@ -16,8 +16,8 @@ const JSConstSpec CJS_Highlight::ConstSpecs[] = { int CJS_Highlight::ObjDefnID = -1; // static -void CJS_Highlight::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("highlight", eObjType, nullptr, nullptr); +void CJS_Highlight::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("highlight", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_highlight.h b/fpdfsdk/javascript/cjs_highlight.h index 3e7118762a..71b88adbb7 100644 --- a/fpdfsdk/javascript/cjs_highlight.h +++ b/fpdfsdk/javascript/cjs_highlight.h @@ -11,7 +11,7 @@ class CJS_Highlight : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Highlight(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Highlight() override {} diff --git a/fpdfsdk/javascript/cjs_position.cpp b/fpdfsdk/javascript/cjs_position.cpp index d53c514b73..744f159e60 100644 --- a/fpdfsdk/javascript/cjs_position.cpp +++ b/fpdfsdk/javascript/cjs_position.cpp @@ -19,8 +19,8 @@ const JSConstSpec CJS_Position::ConstSpecs[] = { int CJS_Position::ObjDefnID = -1; // static -void CJS_Position::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("position", eObjType, nullptr, nullptr); +void CJS_Position::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("position", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_position.h b/fpdfsdk/javascript/cjs_position.h index fda2b6cba5..07971f1ad5 100644 --- a/fpdfsdk/javascript/cjs_position.h +++ b/fpdfsdk/javascript/cjs_position.h @@ -11,7 +11,7 @@ class CJS_Position : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Position(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Position() override {} diff --git a/fpdfsdk/javascript/cjs_runtime.cpp b/fpdfsdk/javascript/cjs_runtime.cpp index 1b566b121c..57dfffe716 100644 --- a/fpdfsdk/javascript/cjs_runtime.cpp +++ b/fpdfsdk/javascript/cjs_runtime.cpp @@ -116,34 +116,34 @@ void CJS_Runtime::DefineJSObjects() { // The call order determines the "ObjDefID" assigned to each class. // ObjDefIDs 0 - 2 - CJS_Border::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Display::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Font::DefineJSObjects(this, FXJSOBJTYPE_STATIC); + CJS_Border::DefineJSObjects(this); + CJS_Display::DefineJSObjects(this); + CJS_Font::DefineJSObjects(this); // ObjDefIDs 3 - 5 - CJS_Highlight::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Position::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_ScaleHow::DefineJSObjects(this, FXJSOBJTYPE_STATIC); + CJS_Highlight::DefineJSObjects(this); + CJS_Position::DefineJSObjects(this); + CJS_ScaleHow::DefineJSObjects(this); // ObjDefIDs 6 - 8 - CJS_ScaleWhen::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Style::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Zoomtype::DefineJSObjects(this, FXJSOBJTYPE_STATIC); + CJS_ScaleWhen::DefineJSObjects(this); + CJS_Style::DefineJSObjects(this); + CJS_Zoomtype::DefineJSObjects(this); // ObjDefIDs 9 - 11 - CJS_App::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Color::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Console::DefineJSObjects(this, FXJSOBJTYPE_STATIC); + CJS_App::DefineJSObjects(this); + CJS_Color::DefineJSObjects(this); + CJS_Console::DefineJSObjects(this); // ObjDefIDs 12 - 14 - CJS_Document::DefineJSObjects(this, FXJSOBJTYPE_GLOBAL); - CJS_Event::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Field::DefineJSObjects(this, FXJSOBJTYPE_DYNAMIC); + CJS_Document::DefineJSObjects(this); + CJS_Event::DefineJSObjects(this); + CJS_Field::DefineJSObjects(this); // ObjDefIDs 15 - 17 - CJS_Global::DefineJSObjects(this, FXJSOBJTYPE_STATIC); - CJS_Icon::DefineJSObjects(this, FXJSOBJTYPE_DYNAMIC); - CJS_Util::DefineJSObjects(this, FXJSOBJTYPE_STATIC); + CJS_Global::DefineJSObjects(this); + CJS_Icon::DefineJSObjects(this); + CJS_Util::DefineJSObjects(this); // ObjDefIDs 18 - 20 (these can't fail, return void). CJS_PublicMethods::DefineJSObjects(this); @@ -151,9 +151,9 @@ void CJS_Runtime::DefineJSObjects() { CJS_GlobalArrays::DefineJSObjects(this); // ObjDefIDs 21 - 23. - CJS_TimerObj::DefineJSObjects(this, FXJSOBJTYPE_DYNAMIC); - CJS_PrintParamsObj::DefineJSObjects(this, FXJSOBJTYPE_DYNAMIC); - CJS_Annot::DefineJSObjects(this, FXJSOBJTYPE_DYNAMIC); + CJS_TimerObj::DefineJSObjects(this); + CJS_PrintParamsObj::DefineJSObjects(this); + CJS_Annot::DefineJSObjects(this); } IJS_EventContext* CJS_Runtime::NewEventContext() { diff --git a/fpdfsdk/javascript/cjs_scalehow.cpp b/fpdfsdk/javascript/cjs_scalehow.cpp index 0da304b8d9..cd1b663a46 100644 --- a/fpdfsdk/javascript/cjs_scalehow.cpp +++ b/fpdfsdk/javascript/cjs_scalehow.cpp @@ -14,8 +14,8 @@ const JSConstSpec CJS_ScaleHow::ConstSpecs[] = { int CJS_ScaleHow::ObjDefnID = -1; // static -void CJS_ScaleHow::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("scaleHow", eObjType, nullptr, nullptr); +void CJS_ScaleHow::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("scaleHow", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_scalehow.h b/fpdfsdk/javascript/cjs_scalehow.h index 4ddf943a65..e9272fb1ae 100644 --- a/fpdfsdk/javascript/cjs_scalehow.h +++ b/fpdfsdk/javascript/cjs_scalehow.h @@ -11,7 +11,7 @@ class CJS_ScaleHow : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_ScaleHow(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_ScaleHow() override {} diff --git a/fpdfsdk/javascript/cjs_scalewhen.cpp b/fpdfsdk/javascript/cjs_scalewhen.cpp index 95314a2ba0..b27f1f4b24 100644 --- a/fpdfsdk/javascript/cjs_scalewhen.cpp +++ b/fpdfsdk/javascript/cjs_scalewhen.cpp @@ -16,8 +16,8 @@ const JSConstSpec CJS_ScaleWhen::ConstSpecs[] = { int CJS_ScaleWhen::ObjDefnID = -1; // static -void CJS_ScaleWhen::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("scaleWhen", eObjType, nullptr, nullptr); +void CJS_ScaleWhen::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("scaleWhen", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_scalewhen.h b/fpdfsdk/javascript/cjs_scalewhen.h index 50a723b285..ec296d46ab 100644 --- a/fpdfsdk/javascript/cjs_scalewhen.h +++ b/fpdfsdk/javascript/cjs_scalewhen.h @@ -11,7 +11,7 @@ class CJS_ScaleWhen : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_ScaleWhen(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_ScaleWhen() override {} diff --git a/fpdfsdk/javascript/cjs_style.cpp b/fpdfsdk/javascript/cjs_style.cpp index 03e3f6d789..26f97d1071 100644 --- a/fpdfsdk/javascript/cjs_style.cpp +++ b/fpdfsdk/javascript/cjs_style.cpp @@ -18,7 +18,7 @@ const JSConstSpec CJS_Style::ConstSpecs[] = { int CJS_Style::ObjDefnID = -1; // static -void CJS_Style::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("style", eObjType, nullptr, nullptr); +void CJS_Style::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("style", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_style.h b/fpdfsdk/javascript/cjs_style.h index a7f3999c26..20a987fc51 100644 --- a/fpdfsdk/javascript/cjs_style.h +++ b/fpdfsdk/javascript/cjs_style.h @@ -11,7 +11,7 @@ class CJS_Style : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Style(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Style() override {} diff --git a/fpdfsdk/javascript/cjs_zoomtype.cpp b/fpdfsdk/javascript/cjs_zoomtype.cpp index 682308c8d8..dbd54068f3 100644 --- a/fpdfsdk/javascript/cjs_zoomtype.cpp +++ b/fpdfsdk/javascript/cjs_zoomtype.cpp @@ -19,8 +19,8 @@ const JSConstSpec CJS_Zoomtype::ConstSpecs[] = { int CJS_Zoomtype::ObjDefnID = -1; // static -void CJS_Zoomtype::DefineJSObjects(CFXJS_Engine* pEngine, - FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("zoomtype", eObjType, nullptr, nullptr); +void CJS_Zoomtype::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("zoomtype", FXJSOBJTYPE_STATIC, nullptr, nullptr); DefineConsts(pEngine, ObjDefnID, ConstSpecs); } diff --git a/fpdfsdk/javascript/cjs_zoomtype.h b/fpdfsdk/javascript/cjs_zoomtype.h index 84cecee9e2..5bc5520d1c 100644 --- a/fpdfsdk/javascript/cjs_zoomtype.h +++ b/fpdfsdk/javascript/cjs_zoomtype.h @@ -11,7 +11,7 @@ class CJS_Zoomtype : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Zoomtype(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Zoomtype() override {} diff --git a/fpdfsdk/javascript/color.cpp b/fpdfsdk/javascript/color.cpp index 300565b5c8..cb6503a06a 100644 --- a/fpdfsdk/javascript/color.cpp +++ b/fpdfsdk/javascript/color.cpp @@ -37,10 +37,10 @@ const JSMethodSpec CJS_Color::MethodSpecs[] = {{"convert", convert_static}, int CJS_Color::ObjDefnID = -1; // static -void CJS_Color::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = - pEngine->DefineObj("color", eObjType, JSConstructor<CJS_Color, color>, - JSDestructor<CJS_Color>); +void CJS_Color::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("color", FXJSOBJTYPE_STATIC, + JSConstructor<CJS_Color, color>, + JSDestructor<CJS_Color>); DefineProps(pEngine, ObjDefnID, PropertySpecs); DefineMethods(pEngine, ObjDefnID, MethodSpecs); } diff --git a/fpdfsdk/javascript/color.h b/fpdfsdk/javascript/color.h index 7fc0a60aff..4a5aa5f025 100644 --- a/fpdfsdk/javascript/color.h +++ b/fpdfsdk/javascript/color.h @@ -85,7 +85,7 @@ class color : public CJS_EmbedObj { class CJS_Color : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Color(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Color() override {} diff --git a/fpdfsdk/javascript/console.cpp b/fpdfsdk/javascript/console.cpp index adfbb444e0..c3cb8b7da7 100644 --- a/fpdfsdk/javascript/console.cpp +++ b/fpdfsdk/javascript/console.cpp @@ -23,8 +23,8 @@ const JSMethodSpec CJS_Console::MethodSpecs[] = {{"clear", clear_static}, int CJS_Console::ObjDefnID = -1; // static -void CJS_Console::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj("console", eObjType, +void CJS_Console::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("console", FXJSOBJTYPE_STATIC, JSConstructor<CJS_Console, console>, JSDestructor<CJS_Console>); DefineMethods(pEngine, ObjDefnID, MethodSpecs); diff --git a/fpdfsdk/javascript/console.h b/fpdfsdk/javascript/console.h index 78743e62d9..d06c443a81 100644 --- a/fpdfsdk/javascript/console.h +++ b/fpdfsdk/javascript/console.h @@ -29,7 +29,7 @@ class console : public CJS_EmbedObj { class CJS_Console : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Console(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Console() override {} diff --git a/fpdfsdk/javascript/event.cpp b/fpdfsdk/javascript/event.cpp index 07e439be47..fcb5b046b1 100644 --- a/fpdfsdk/javascript/event.cpp +++ b/fpdfsdk/javascript/event.cpp @@ -39,10 +39,10 @@ const JSPropertySpec CJS_Event::PropertySpecs[] = { int CJS_Event::ObjDefnID = -1; // static -void CJS_Event::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = - pEngine->DefineObj("event", eObjType, JSConstructor<CJS_Event, event>, - JSDestructor<CJS_Event>); +void CJS_Event::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = pEngine->DefineObj("event", FXJSOBJTYPE_STATIC, + JSConstructor<CJS_Event, event>, + JSDestructor<CJS_Event>); DefineProps(pEngine, ObjDefnID, PropertySpecs); } diff --git a/fpdfsdk/javascript/event.h b/fpdfsdk/javascript/event.h index 2041efc297..8aa7c0e639 100644 --- a/fpdfsdk/javascript/event.h +++ b/fpdfsdk/javascript/event.h @@ -77,7 +77,7 @@ class event : public CJS_EmbedObj { class CJS_Event : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Event(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Event() override {} diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index 4493a47d46..4b0db62583 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -66,10 +66,11 @@ const JSMethodSpec CJS_Util::MethodSpecs[] = { int CJS_Util::ObjDefnID = -1; // static -void CJS_Util::DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType) { - ObjDefnID = pEngine->DefineObj( - "util", eObjType, JSConstructor<CJS_Util, util>, JSDestructor<CJS_Util>); - CJS_Object::DefineMethods(pEngine, ObjDefnID, MethodSpecs); +void CJS_Util::DefineJSObjects(CFXJS_Engine* pEngine) { + ObjDefnID = + pEngine->DefineObj("util", FXJSOBJTYPE_STATIC, + JSConstructor<CJS_Util, util>, JSDestructor<CJS_Util>); + DefineMethods(pEngine, ObjDefnID, MethodSpecs); } util::util(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {} diff --git a/fpdfsdk/javascript/util.h b/fpdfsdk/javascript/util.h index 68f82e7d1b..269b89efa3 100644 --- a/fpdfsdk/javascript/util.h +++ b/fpdfsdk/javascript/util.h @@ -44,7 +44,7 @@ class util : public CJS_EmbedObj { class CJS_Util : public CJS_Object { public: - static void DefineJSObjects(CFXJS_Engine* pEngine, FXJSOBJTYPE eObjType); + static void DefineJSObjects(CFXJS_Engine* pEngine); explicit CJS_Util(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Util() override {} |