Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: fpdfsdk/include/javascript/JS_Object.h

Issue 1349423006: More tidy of CJS_Object, kill implicit cast operator (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/JS_Object.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/javascript/JS_Object.h
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index a7772f1cf9503ce3024e67d10060bbe02b863691..c7f92ac61d4094f3158d75952b926753988cf731 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;
};
« no previous file with comments | « no previous file | fpdfsdk/src/javascript/JS_Object.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698