From 6df59849472958e7de96da6d9fc7b223b7c1f1c3 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 10 Sep 2015 11:56:37 -0700 Subject: 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 . --- fpdfsdk/include/javascript/JS_Object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/include/javascript/JS_Object.h') diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h index 9fd7bff3d4..a7772f1cf9 100644 --- a/fpdfsdk/include/javascript/JS_Object.h +++ b/fpdfsdk/include/javascript/JS_Object.h @@ -48,7 +48,7 @@ class CJS_EmbedObj { class CJS_Object { public: - explicit CJS_Object(JSFXObject pObject); + explicit CJS_Object(v8::Local pObject); virtual ~CJS_Object(); void MakeWeak(); @@ -60,7 +60,7 @@ class CJS_Object { virtual FX_BOOL InitInstance(IFXJS_Context* cc) { return TRUE; } virtual FX_BOOL ExitInstance() { return TRUE; } - operator JSFXObject() { + operator v8::Local() { return v8::Local::New(m_pIsolate, m_pObject); } -- cgit v1.2.3