Closed Bug 1189736 Opened 4 years ago Closed 4 years ago

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

Categories

(MailNews Core :: Backend, defect)

defect
Not set

Tracking

(seamonkey2.39 fixed)

RESOLVED FIXED
Thunderbird 42.0
Tracking Status
seamonkey2.39 --- fixed

People

(Reporter: misak.bugzilla, Assigned: misak.bugzilla)

References

Details

Attachments

(2 files)

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%
Duplicate of this bug: 1189738
Status: NEW → ASSIGNED
Component: MailNews: General → Backend
Flags: needinfo?(n.nethercote)
OS: Linux → All
Product: SeaMonkey → MailNews Core
Hardware: x86_64 → All
Attachment #8641737 - Attachment description: WIP patch (working) → Patch. Compiles and works.
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 on attachment 8641737 [details] [diff] [review]
Patch. Compiles and works.

Works for me too.
Attachment #8641737 - Flags: feedback+
http://hg.mozilla.org/comm-central/rev/85f81472a34c
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 42.0
Flags: needinfo?(n.nethercote)
You need to log in before you can comment on or make changes to this bug.