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

Unified Diff: xfa/include/fwl/core/fwl_note.h

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/include/fwl/core/fwl_form.h ('k') | xfa/include/fwl/core/fwl_target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/include/fwl/core/fwl_note.h
diff --git a/xfa/include/fwl/core/fwl_note.h b/xfa/include/fwl/core/fwl_note.h
index 66366e92e44da5081f3778fdbed48e520dc4b1cd..e6579bff10dcd868631d76cd8590330aac5818b6 100644
--- a/xfa/include/fwl/core/fwl_note.h
+++ b/xfa/include/fwl/core/fwl_note.h
@@ -120,6 +120,9 @@ class IFWL_NoteLoop;
#define FWL_KEYFLAG_LButton (1 << 4)
#define FWL_KEYFLAG_RButton (1 << 5)
#define FWL_KEYFLAG_MButton (1 << 6)
+
+// Separate hierarchy not related to IFWL_* hierarchy. These should not
+// get cast to IFWL_* types.
class CFWL_Note {
public:
virtual FX_DWORD Release() {
@@ -130,9 +133,9 @@ class CFWL_Note {
}
return dwRefCount;
}
- virtual IFWL_Target* Retain() {
+ virtual CFWL_Note* Retain() {
m_dwRefCount++;
- return (IFWL_Target*)this;
+ return this;
}
virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const {
wsClass = L"CFWL_Note";
« no previous file with comments | « xfa/include/fwl/core/fwl_form.h ('k') | xfa/include/fwl/core/fwl_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698