summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Object.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_Object.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/src/javascript/JS_Object.cpp
index 6891e6fc60..3cffec785d 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) {