Bug 1293117 (part 7) - Remove two occurrences of |static NS_IMETHODIMP|. r=froydnj.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 10 Aug 2016 10:20:41 +1000
changeset 309109 32e07e32891d070cdba97e2872cd30265278c0bf
parent 309108 05133363f4edf4633ce9ee0dff1ce31f56908c9d
child 309110 2d5a7f342256264b31c8378795c03b5844bfc53b
push id30557
push userkwierso@gmail.com
push dateFri, 12 Aug 2016 20:45:15 +0000
treeherdermozilla-central@ef3a50774180 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1293117
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1293117 (part 7) - Remove two occurrences of |static NS_IMETHODIMP|. r=froydnj. Because it's a combination that doesn't make sense. - ReadFuncBinaryString becomes NS_METHOD, because it's passed to ReadSegments, which requires a function matching NS_CALLBACK. - IccContactListToMozContactList just changes to a vanilla nsresult return type, because it doesn't need __stdcall on Windows.
dom/base/FileReader.cpp
dom/icc/IccCallback.cpp
--- a/dom/base/FileReader.cpp
+++ b/dom/base/FileReader.cpp
@@ -176,17 +176,17 @@ FileReader::GetResult(JSContext* aCx,
 
   nsString tmpResult = mResult;
   if (!xpc::StringToJsval(aCx, tmpResult, aResult)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 }
 
-static NS_IMETHODIMP
+static NS_METHOD
 ReadFuncBinaryString(nsIInputStream* in,
                      void* closure,
                      const char* fromRawSegment,
                      uint32_t toOffset,
                      uint32_t count,
                      uint32_t *writeCount)
 {
   char16_t* dest = static_cast<char16_t*>(closure) + toOffset;
--- a/dom/icc/IccCallback.cpp
+++ b/dom/icc/IccCallback.cpp
@@ -94,17 +94,17 @@ IccContactToMozContact(JSContext* aCx, G
   rv = er.StealNSResult();
   NS_ENSURE_SUCCESS(rv, rv);
 
   contact.forget(aMozContact);
 
   return NS_OK;
 }
 
-static NS_IMETHODIMP
+static nsresult
 IccContactListToMozContactList(JSContext* aCx, GlobalObject& aGlobal,
                                nsIIccContact** aContacts, uint32_t aCount,
                                nsTArray<RefPtr<mozContact>>& aContactList)
 {
   aContactList.SetCapacity(aCount);
   for (uint32_t i = 0; i < aCount ; i++) {
     RefPtr<mozContact> contact;
     nsresult rv =