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

Unified Diff: fpdfsdk/src/javascript/JS_Value.cpp

Issue 1357243002: Merge to XFA:More tidy of CJS_Object, kill implicit cast operator (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
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 | « fpdfsdk/src/javascript/JS_Object.cpp ('k') | fpdfsdk/src/javascript/global.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Value.cpp
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 23def5dc9ce14b81cc642850f28408af8bd673ae..a07c61f108e3ad5be3d1c70743ced0dffa23eac2 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -61,7 +61,7 @@ CJS_Value::CJS_Value(v8::Isolate* isolate, CJS_Document* pJsDoc)
: m_isolate(isolate) {
m_eType = VT_object;
if (pJsDoc)
- m_pValue = (v8::Local<v8::Object>)*pJsDoc;
+ m_pValue = pJsDoc->ToV8Object();
}
CJS_Value::CJS_Value(v8::Isolate* isolate, const FX_WCHAR* pWstr)
@@ -172,13 +172,13 @@ void CJS_Value::operator=(v8::Local<v8::Object> pObj) {
void CJS_Value::operator=(CJS_Object* pObj) {
if (pObj)
- operator=((v8::Local<v8::Object>)*pObj);
+ operator=(pObj->ToV8Object());
}
void CJS_Value::operator=(CJS_Document* pJsDoc) {
m_eType = VT_object;
if (pJsDoc) {
- m_pValue = static_cast<v8::Local<v8::Object>>(*pJsDoc);
+ m_pValue = pJsDoc->ToV8Object();
}
}
« no previous file with comments | « fpdfsdk/src/javascript/JS_Object.cpp ('k') | fpdfsdk/src/javascript/global.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698