summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-21 09:01:56 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-21 09:01:56 -0700
commit270fc65d5824eeedbb2ed17516a72721bde9c9ef (patch)
tree59ffc0bcf73daa6dfc08afe06bfb2b6ad64f4561 /fpdfsdk/include
parent34b39e1d4fa0b16d47770b823230344356cc451a (diff)
downloadpdfium-270fc65d5824eeedbb2ed17516a72721bde9c9ef.tar.xz
More tidy of CJS_Object, kill implicit cast operator
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1349423006 .
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h6
1 files changed, 2 insertions, 4 deletions
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<v8::Object>() {
- return v8::Local<v8::Object>::New(m_pIsolate, m_pObject);
- }
+ v8::Local<v8::Object> 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<CJS_EmbedObj> m_pEmbedObj;
- v8::Global<v8::Object> m_pObject;
+ v8::Global<v8::Object> m_pV8Object;
v8::Isolate* m_pIsolate;
};