merge nsICMSMessage2 and nsICMSMessage into nsICMSMessage
Categories
(MailNews Core :: Security: S/MIME, enhancement)
Tracking
(Not tracked)
People
(Reporter: mkmelin, Assigned: mkmelin)
Details
Attachments
(2 files)
11.64 KB,
patch
|
KaiE
:
review+
jorgk-bmo
:
review-
|
Details | Diff | Splinter Review |
13.11 KB,
patch
|
Details | Diff | Splinter Review |
For some reason stumbled upon bug 330503...
We should merge nsICMSMessage2 and nsICMSMessage into nsICMSMessage to avoid the strange complications of having two interfaces when it's supposed to be one. Interface stability isn't a thing anymore.
Assignee | ||
Comment 1•5 years ago
|
||
Moved the code into nsICMSMessage
New is infallible, so removed a if (!listener) check too while I was there.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Could the assignee and reviewer please compile with the patches the submit for landing. We have enough M-C-caused bustage, we don't need bustage of our own :-(
0:35.29 c:/mozilla-source/comm-central/obj-x86_64-pc-mingw32/dist/include\nsCOMPtr.h(1158,3): error: static_assert failed due to requirement '!(mozilla::IsSame<nsICMSMessage, nsICMSMessage>::value || mozilla::IsBaseOf<nsICMSMessage, nsICMSMessage>::value)' "don't use do_QueryInterface for compile-time-determinable casts"
0:35.29 static_assert(
0:35.29 ^
0:35.29 c:/mozilla-source/comm-central/obj-x86_64-pc-mingw32/dist/include\nsCOMPtr.h(570,5): note: in instantiation of function template specialization 'nsCOMPtr<nsICMSMessage>::assign_from_qi<nsICMSMessage>' requested here
0:35.29 assign_from_qi(aQI, NS_GET_TEMPLATE_IID(T));
0:35.29 ^
0:35.29 c:/mozilla-source/comm-central/comm/mailnews/mime/src/mimecms.cpp(311,33): note: in instantiation of function template specialization 'nsCOMPtr<nsICMSMessage>::nsCOMPtr<nsICMSMessage>' requested here
0:35.29 nsCOMPtr<nsICMSMessage> msg = do_QueryInterface(aVerifiedMessage);
0:35.29 ^
0:35.29 1 error generated.
0:35.32 mozmake[4]: *** [c:/mozilla-source/comm-central/config/rules.mk:807: mimecms.obj] Error 1
0:35.32 mozmake[4]: *** Waiting for unfinished jobs....
0:36.77 mozmake[3]: *** [c:/mozilla-source/comm-central/config/recurse.mk:74: comm/mailnews/mime/src/target] Error 2
0:36.77 mozmake[3]: *** Waiting for unfinished jobs....
Comment 3•5 years ago
|
||
Comment on attachment 9048148 [details] [diff] [review] bug1532261_merge_cms.patch For not even compiling :-(
Comment 4•5 years ago
|
||
This compiles. Try interdiff.
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/664daac5ba9c
merge nsICMSMessage2 and nsICMSMessage into nsICMSMessage. r=kaie,jorgk
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Just FYI, the patch does compile just fine on linux. Apparently windows is pickier in this case.
(Yes, the do_QueryInterface is of course pointless there.)
Comment 7•5 years ago
|
||
Well, then you should switch compilers or install the static analysis bit. Alternatively, read the code:
-NS_IMETHODIMP nsSMimeVerificationListener::Notify(nsICMSMessage2 *aVerifiedMessage,
+NS_IMETHODIMP nsSMimeVerificationListener::Notify(nsICMSMessage *aVerifiedMessage,
nsresult aVerificationResultCode)
{
// Only continue if we have a valid pointer to the UI
NS_ENSURE_FALSE(mSinkIsNull, NS_OK);
NS_ENSURE_TRUE(aVerifiedMessage, NS_ERROR_FAILURE);
nsCOMPtr<nsICMSMessage> msg = do_QueryInterface(aVerifiedMessage);
You've changed the interface, so the QI was unneeded.
Assignee | ||
Comment 8•5 years ago
|
||
I'm just compiling with what mozilla's setup gives me.
Description
•