Looks like this https://hg.mozilla.org/mozilla-central/rev/673a9080e14d broke the compile at least here: c:\mozilla-source\comm-central\obj-i686-pc-mingw32\dist\include\nsAutoPtr.h(26) : error C2338: If you are using nsAutoPtr to hold an array, use UniquePtr<T> instead c:/mozilla-source/comm-central/mailnews/base/src/nsMessenger.cpp(154) : see reference to class template instantiation 'nsAutoPtr<char>' being compiled
I derived the fix looking at https://hg.mozilla.org/mozilla-central/rev/673a9080e14d#l7.49 I've also tried: -#include "nsAutoPtr.h" +#include "mozilla/UniquePtr.h" - nsAutoPtr<char> m_dataBuffer; + mozilla::UniquePtr<char> m_dataBuffer; - m_dataBuffer = new char[FOUR_K]; + m_dataBuffer = mozilla::MakeUnique<char>(FOUR_K); but that gave all sorts of hassle where m_dataBuffer is passed as a char*. Luckily there is only one occurrence in the whole C-C tree of this.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Attachment #8714015 - Flags: review?(Pidgeot18)
Actually, this needs to change, too: if (m_dataBuffer && m_outputStream)
More tweaks. Sorry.
Depends on: 1241901
Summary: Bustage of 30 Jan 2016 due to bug 1241901 → Stop using nsAutoPtr for holding primitive arrays in MailNews due to bug 1241901
(In reply to Jorg K (GMT+1) from comment #1) > but that gave all sorts of hassle where m_dataBuffer is passed as a char*. You probably should replace all of them with m_dataBuffer.get() rather than inline a 4k array in the class.
Kent, perhaps you can get to this before Joshua. BTW, the second patch was inspired by https://hg.mozilla.org/mozilla-central/rev/673a9080e14d#l4.32
Comment on attachment 8714018 [details] [diff] [review] Bustage fix (v2). Review of attachment 8714018 [details] [diff] [review]: ----------------------------------------------------------------- This one looks better.
Attachment #8714018 - Flags: review?(Pidgeot18) → review+
https://hg.mozilla.org/comm-central/rev/de29414d264853d08ced88a2b416107b18b31607 Bug 1244466 - Port Bug 1241901 part 4 - Stop using nsAutoPtr for holding primitive arrays. r=jcranmer a=aleth CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 47.0
You need to log in before you can comment on or make changes to this bug.