The default bug view has changed. See this FAQ.

Port Bug 1189156 [Don't use enumeration style in hash table SizeOf*() functions ] to comm-central

RESOLVED FIXED in Thunderbird 42.0

Status

MailNews Core
Backend
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Misak Khachatryan, Assigned: Misak Khachatryan)

Tracking

Trunk
Thunderbird 42.0

SeaMonkey Tracking Flags

(seamonkey2.39 fixed)

Details

Attachments

(2 attachments)

(Assignee)

Description

2 years ago
Trying to fix this, but can't understand first part of patch. I don't have deep knowledge in this par of code and generally in programming.

Nicolas, can You please suggest the correct way?

Currently patch doesn't compile with this error:

 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp: In member function ‘virtual size_t nsMsgDatabase::SizeOfExcludingThis(mozilla::MallocSizeOf) const’:
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp:1004:56: error: request for member ‘ConstIter’ in ‘nsMsgDatabase::HeaderHashSizeOf’, which is of non-class type ‘size_t(PLDHashEntryHdr*, mozilla::MallocSizeOf, void*) {aka long unsigned int(PLDHashEntryHdr*, long unsigned int (*)(const void*), void*)}’
 0:05.35        for (auto iter = nsMsgDatabase::HeaderHashSizeOf.ConstIter(); !iter.Done(); iter.Next()) {
 0:05.35                                                         ^
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp:1005:34: error: ‘GlobalNameMapEntry’ does not name a type
 0:05.35          auto entry = static_cast<GlobalNameMapEntry*>(iter.Get());
 0:05.35                                   ^
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp:1005:52: error: expected ‘>’ before ‘*’ token
 0:05.35          auto entry = static_cast<GlobalNameMapEntry*>(iter.Get());
 0:05.35                                                     ^
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp:1005:52: error: expected ‘(’ before ‘*’ token
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp:1005:53: error: expected primary-expression before ‘>’ token
 0:05.35          auto entry = static_cast<GlobalNameMapEntry*>(iter.Get());
 0:05.35                                                      ^
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp:1005:66: error: expected ‘)’ before ‘;’ token
 0:05.35          auto entry = static_cast<GlobalNameMapEntry*>(iter.Get());
 0:05.35                                                                   ^
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp: In member function ‘virtual nsresult nsMsgDatabase::GetCachedHits(const char*, nsISimpleEnumerator**)’:
 0:05.35 Warning: -Wunused-variable in /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp: unused variable ‘err’
 0:05.35 /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp:5714:12: warning: unused variable ‘err’ [-Wunused-variable]
 0:05.35    nsresult err = GetSearchResultsTable(aSearchFolderUri, false, getter_AddRefs(table));
 0:05.35             ^
 0:05.35 
 0:05.35 In the directory  /home/misak/workspace/suite-opt/mailnews/db/msgdb/src
 0:05.35 The following command failed to execute properly:
 0:05.35 /usr/bin/ccache c++ -o nsMsgDatabase.o -c -I../../../../dist/stl_wrappers -I../../../../dist/system_wrappers -include /home/misak/workspace/src/mozilla/config/gcc_hidden.h -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/home/misak/workspace/src/mailnews/db/msgdb/src -I. -I../../../../dist/include -I/home/misak/workspace/suite-opt/dist/include/nspr -I/home/misak/workspace/suite-opt/dist/include/nss -fPIC -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -MD -MP -MF .deps/nsMsgDatabase.o.pp -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -freorder-blocks -Os -fomit-frame-pointer /home/misak/workspace/src/mailnews/db/msgdb/src/nsMsgDatabase.cpp
 0:05.35 /home/misak/workspace/src/mozilla/config/rules.mk:958: recipe for target 'nsMsgDatabase.o' failed
 0:05.35 gmake[4]: *** [nsMsgDatabase.o] Error 1
 0:05.35 /home/misak/workspace/src/mozilla/config/recurse.mk:71: recipe for target 'mailnews/db/msgdb/src/target' failed
 0:05.35 gmake[3]: *** [mailnews/db/msgdb/src/target] Error 2
 0:05.35 /home/misak/workspace/src/mozilla/config/recurse.mk:32: recipe for target 'compile' failed
 0:05.35 gmake[2]: *** [compile] Error 2
 0:05.35 /home/misak/workspace/src/mozilla/config/rules.mk:549: recipe for target 'default' failed
 0:05.35 gmake[1]: *** [default] Error 2
 0:05.35 client.mk:404: recipe for target 'build' failed
 0:05.35 gmake: *** [build] Error 2
 0:05.40 856 compiler warnings present.
 0:06.47 ccache (direct) hit rate: 0.0%; (preprocessed) hit rate: 0.0%; miss rate: 100.0%

Updated

2 years ago
Duplicate of this bug: 1189738

Updated

2 years ago
Status: NEW → ASSIGNED
Component: MailNews: General → Backend
Flags: needinfo?(n.nethercote)
OS: Linux → All
Product: SeaMonkey → MailNews Core
Hardware: x86_64 → All

Comment 2

2 years ago
Created attachment 8641737 [details] [diff] [review]
Patch. Compiles and works.

Updated

2 years ago
Attachment #8641737 - Attachment description: WIP patch (working) → Patch. Compiles and works.

Updated

2 years ago
Attachment #8641737 - Flags: review?(Pidgeot18)
Comment on attachment 8641737 [details] [diff] [review]
Patch. Compiles and works.

Review of attachment 8641737 [details] [diff] [review]:
-----------------------------------------------------------------

rs=me
Attachment #8641737 - Flags: review?(Pidgeot18) → review+

Comment 4

2 years ago
Comment on attachment 8641737 [details] [diff] [review]
Patch. Compiles and works.

Works for me too.
Attachment #8641737 - Flags: feedback+

Comment 5

2 years ago
http://hg.mozilla.org/comm-central/rev/85f81472a34c
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-seamonkey2.39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 42.0
Flags: needinfo?(n.nethercote)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
You need to log in before you can comment on or make changes to this bug.