summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Object.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-21 09:22:05 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-21 09:22:05 -0700
commit116e4addeecd2cb779b1ab590bea2d091ca12915 (patch)
tree1f313d843abb122a79b9272e17fb379292a89ffa /fpdfsdk/src/javascript/JS_Object.cpp
parentb2ed5de36ca387e0a9bbc3dfb9f5b568c7cc2ea8 (diff)
downloadpdfium-116e4addeecd2cb779b1ab590bea2d091ca12915.tar.xz
Merge to XFA:More tidy of CJS_Object, kill implicit cast operator
(cherry picked from commit 270fc65d5824eeedbb2ed17516a72721bde9c9ef) Original Review URL: https://codereview.chromium.org/1349423006 . TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1357243002 .
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) {