From 270fc65d5824eeedbb2ed17516a72721bde9c9ef Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 21 Sep 2015 09:01:56 -0700 Subject: More tidy of CJS_Object, kill implicit cast operator R=thestig@chromium.org Review URL: https://codereview.chromium.org/1349423006 . --- fpdfsdk/include/javascript/JS_Object.h | 6 ++---- 1 file changed, 2 insertions(+), 4 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 a7772f1cf9..c7f92ac61d 100644 --- a/fpdfsdk/include/javascript/JS_Object.h +++ b/fpdfsdk/include/javascript/JS_Object.h @@ -60,9 +60,7 @@ class CJS_Object { virtual FX_BOOL InitInstance(IFXJS_Context* cc) { return TRUE; } virtual FX_BOOL ExitInstance() { return TRUE; } - operator v8::Local() { - return v8::Local::New(m_pIsolate, m_pObject); - } + v8::Local ToV8Object() { return m_pV8Object.Get(m_pIsolate); } // Takes ownership of |pObj|. void SetEmbedObject(CJS_EmbedObj* pObj) { m_pEmbedObj.reset(pObj); } @@ -81,7 +79,7 @@ class CJS_Object { protected: nonstd::unique_ptr m_pEmbedObj; - v8::Global m_pObject; + v8::Global m_pV8Object; v8::Isolate* m_pIsolate; }; -- cgit v1.2.3