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

Unified Diff: xfa/src/fwl/src/lightwidget/widget.cpp

Issue 1509203002: FWL refcounts never incremented (part 1) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: protected Created 5 years 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 | « xfa/src/fwl/src/lightwidget/tooltipctrl.cpp ('k') | xfa/src/fxfa/src/app/xfa_fffield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fwl/src/lightwidget/widget.cpp
diff --git a/xfa/src/fwl/src/lightwidget/widget.cpp b/xfa/src/fwl/src/lightwidget/widget.cpp
index 6aeafcef74178add55ea2c92ccb0c6bd1bc9a1f2..b3e5953a2cf9c37158dfd88d079c08acbb0d0a96 100644
--- a/xfa/src/fwl/src/lightwidget/widget.cpp
+++ b/xfa/src/fwl/src/lightwidget/widget.cpp
@@ -29,31 +29,6 @@ CFWL_WidgetImpProperties CFWL_WidgetProperties::MakeWidgetImpProperties(
IFWL_Widget* CFWL_Widget::GetWidget() {
return m_pIface;
}
-FX_DWORD CFWL_Widget::Release() {
- if (!m_pIface)
- return 0;
- FX_DWORD dwRef = m_pIface->GetRefCount();
- if (dwRef == 1) {
- m_pIface->Finalize();
- }
- m_pIface->Release();
- if (dwRef == 1) {
- m_pIface = NULL;
- delete this;
- }
- return dwRef - 1;
-}
-CFWL_Widget* CFWL_Widget::Retain() {
- if (!m_pIface)
- return NULL;
- m_pIface->Retain();
- return this;
-}
-FX_DWORD CFWL_Widget::GetRefCount() const {
- if (!m_pIface)
- return 1;
- return m_pIface->GetRefCount();
-}
FWL_ERR CFWL_Widget::GetClassName(CFX_WideString& wsClass) const {
if (!m_pIface)
return FWL_ERR_Indefinite;
@@ -222,14 +197,10 @@ CFWL_Widget::CFWL_Widget()
FXSYS_assert(m_pWidgetMgr != NULL);
}
CFWL_Widget::~CFWL_Widget() {
- if (m_pProperties) {
- delete m_pProperties;
- m_pProperties = NULL;
- }
+ delete m_pProperties;
if (m_pIface) {
m_pIface->Finalize();
- m_pIface->Release();
- m_pIface = NULL;
+ delete m_pIface;
}
}
FWL_ERR CFWL_Widget::Repaint(const CFX_RectF* pRect) {
« no previous file with comments | « xfa/src/fwl/src/lightwidget/tooltipctrl.cpp ('k') | xfa/src/fxfa/src/app/xfa_fffield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698