diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-09-10 11:56:37 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-09-10 11:56:37 -0700 |
commit | 6df59849472958e7de96da6d9fc7b223b7c1f1c3 (patch) | |
tree | 90b4908f6de484252f9757010b7002c4f0365a58 /fpdfsdk/include/javascript/Consts.h | |
parent | 0d0935d3d6603dd7d851b1d5828635230f4c43ca (diff) | |
download | pdfium-6df59849472958e7de96da6d9fc7b223b7c1f1c3.tar.xz |
Remove some abstractions in fxjs_v8.h.
It's too hard to keep mapping between v8 and fx abstractions; the lack
of transparency prevents those skilled in v8 only from working on this
code.
Apparently, the original intention was to confine v8 types to
fpdfsdk/{include,src}/jsapi, but fpdfsdk/{include,src}/javascript
is already well-polluted with v8 types.
Also remove no-op JS_SetThisObj().
Also remove unused ParserParams() [noticed because it was incorrectly
passing handles as pointers].
Also remove cast operator from CJS_Runtime and call GetIsolate()
explicitly.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1332973002 .
Diffstat (limited to 'fpdfsdk/include/javascript/Consts.h')
-rw-r--r-- | fpdfsdk/include/javascript/Consts.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/fpdfsdk/include/javascript/Consts.h b/fpdfsdk/include/javascript/Consts.h index 79f85f8002..165001784b 100644 --- a/fpdfsdk/include/javascript/Consts.h +++ b/fpdfsdk/include/javascript/Consts.h @@ -13,7 +13,7 @@ class CJS_Border : public CJS_Object { public: - explicit CJS_Border(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_Border(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Border() override {} DECLARE_JS_CLASS_CONST(); @@ -23,7 +23,7 @@ class CJS_Border : public CJS_Object { class CJS_Display : public CJS_Object { public: - explicit CJS_Display(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_Display(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Display() override {} DECLARE_JS_CLASS_CONST(); @@ -33,7 +33,7 @@ class CJS_Display : public CJS_Object { class CJS_Font : public CJS_Object { public: - explicit CJS_Font(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_Font(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Font() override {} DECLARE_JS_CLASS_CONST(); @@ -43,7 +43,7 @@ class CJS_Font : public CJS_Object { class CJS_Highlight : public CJS_Object { public: - explicit CJS_Highlight(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_Highlight(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Highlight() override {} DECLARE_JS_CLASS_CONST(); @@ -53,7 +53,7 @@ class CJS_Highlight : public CJS_Object { class CJS_Position : public CJS_Object { public: - explicit CJS_Position(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_Position(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Position() override {} DECLARE_JS_CLASS_CONST(); @@ -63,7 +63,7 @@ class CJS_Position : public CJS_Object { class CJS_ScaleHow : public CJS_Object { public: - explicit CJS_ScaleHow(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_ScaleHow(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_ScaleHow() override {} DECLARE_JS_CLASS_CONST(); @@ -73,7 +73,7 @@ class CJS_ScaleHow : public CJS_Object { class CJS_ScaleWhen : public CJS_Object { public: - explicit CJS_ScaleWhen(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_ScaleWhen(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_ScaleWhen() override {} DECLARE_JS_CLASS_CONST(); @@ -83,7 +83,7 @@ class CJS_ScaleWhen : public CJS_Object { class CJS_Style : public CJS_Object { public: - explicit CJS_Style(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_Style(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Style() override {} DECLARE_JS_CLASS_CONST(); @@ -93,26 +93,24 @@ class CJS_Style : public CJS_Object { class CJS_Zoomtype : public CJS_Object { public: - explicit CJS_Zoomtype(JSFXObject pObject) : CJS_Object(pObject) {} + explicit CJS_Zoomtype(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} ~CJS_Zoomtype() override {} DECLARE_JS_CLASS_CONST(); }; -/* ------------------------------ CJS_GlobalConsts - * ------------------------------ */ +/* ------------------------------ CJS_GlobalConsts -------------------------- */ class CJS_GlobalConsts : public CJS_Object { public: - static int Init(IJS_Runtime* pRuntime); + static int Init(v8::Isolate* pIsolate); }; -/* ------------------------------ CJS_GlobalArrays - * ------------------------------ */ +/* ------------------------------ CJS_GlobalArrays -------------------------- */ class CJS_GlobalArrays : public CJS_Object { public: - static int Init(IJS_Runtime* pRuntime); + static int Init(v8::Isolate* pIsolate); }; #endif // FPDFSDK_INCLUDE_JAVASCRIPT_CONSTS_H_ |