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

Unified Diff: fpdfsdk/src/javascript/JS_Object.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/include/javascript/JS_Object.h ('k') | fpdfsdk/src/javascript/JS_Value.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/javascript/JS_Object.cpp
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp
index 6891e6fc606d55818f04c97a09a1cf25eb6b2d65..3cffec785da2c1db0b5ad898451489c8e7118be7 100644
--- a/fpdfsdk/src/javascript/JS_Object.cpp
+++ b/fpdfsdk/src/javascript/JS_Object.cpp
@@ -83,22 +83,21 @@ void DisposeObject(const v8::WeakCallbackInfo<CJS_Object>& data) {
data.SetSecondPassCallback(FreeObject);
}
-CJS_Object::CJS_Object(v8::Local<v8::Object> pObject) : m_pEmbedObj(NULL) {
- v8::Local<v8::Context> context = pObject->CreationContext();
- m_pIsolate = context->GetIsolate();
- m_pObject.Reset(m_pIsolate, pObject);
-};
+CJS_Object::CJS_Object(v8::Local<v8::Object> pObject) {
+ m_pIsolate = pObject->CreationContext()->GetIsolate();
+ m_pV8Object.Reset(m_pIsolate, pObject);
+}
CJS_Object::~CJS_Object() {
- m_pObject.Reset();
-};
+}
void CJS_Object::MakeWeak() {
- m_pObject.SetWeak(this, DisposeObject, v8::WeakCallbackType::kInternalFields);
+ m_pV8Object.SetWeak(this, DisposeObject,
+ v8::WeakCallbackType::kInternalFields);
}
void CJS_Object::Dispose() {
- m_pObject.Reset();
+ m_pV8Object.Reset();
}
CPDFSDK_PageView* CJS_Object::JSGetPageView(IFXJS_Context* cc) {
« no previous file with comments | « fpdfsdk/include/javascript/JS_Object.h ('k') | fpdfsdk/src/javascript/JS_Value.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698